add more Ids for UI automation (#6673)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
6e2e1c3bbb
Коммит
f80003a975
@@ -203,6 +203,7 @@ export default class NewChannelModal extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var channelSwitchText = '';
|
var channelSwitchText = '';
|
||||||
|
let inputPrefixId = '';
|
||||||
switch (this.props.channelType) {
|
switch (this.props.channelType) {
|
||||||
case 'P':
|
case 'P':
|
||||||
channelSwitchText = (
|
channelSwitchText = (
|
||||||
@@ -214,6 +215,7 @@ export default class NewChannelModal extends React.PureComponent {
|
|||||||
{createPublicChannelLink}
|
{createPublicChannelLink}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
inputPrefixId = 'newPrivateChannel';
|
||||||
break;
|
break;
|
||||||
case 'O':
|
case 'O':
|
||||||
channelSwitchText = (
|
channelSwitchText = (
|
||||||
@@ -225,6 +227,7 @@ export default class NewChannelModal extends React.PureComponent {
|
|||||||
{createPrivateChannelLink}
|
{createPrivateChannelLink}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
inputPrefixId = 'newPublicChannel';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,6 +267,7 @@ export default class NewChannelModal extends React.PureComponent {
|
|||||||
</label>
|
</label>
|
||||||
<div className='col-sm-9'>
|
<div className='col-sm-9'>
|
||||||
<input
|
<input
|
||||||
|
id={inputPrefixId + 'Name'}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
type='text'
|
type='text'
|
||||||
ref='display_name'
|
ref='display_name'
|
||||||
@@ -307,6 +311,7 @@ export default class NewChannelModal extends React.PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
<div className='col-sm-9'>
|
<div className='col-sm-9'>
|
||||||
<textarea
|
<textarea
|
||||||
|
id={inputPrefixId + 'Purpose'}
|
||||||
className='form-control no-resize'
|
className='form-control no-resize'
|
||||||
ref='channel_purpose'
|
ref='channel_purpose'
|
||||||
rows='4'
|
rows='4'
|
||||||
@@ -341,6 +346,7 @@ export default class NewChannelModal extends React.PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
<div className='col-sm-9'>
|
<div className='col-sm-9'>
|
||||||
<textarea
|
<textarea
|
||||||
|
id={inputPrefixId + 'Header'}
|
||||||
className='form-control no-resize'
|
className='form-control no-resize'
|
||||||
ref='channel_header'
|
ref='channel_header'
|
||||||
rows='4'
|
rows='4'
|
||||||
|
|||||||
@@ -290,7 +290,12 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
<div
|
<div
|
||||||
className={'post post--thread ' + compactClass}
|
className={'post post--thread ' + compactClass}
|
||||||
>
|
>
|
||||||
<div className='search-channel__name'>{channelName}</div>
|
<div
|
||||||
|
id={idCount === -1 ? null : Utils.createSafeId('searchChannelName' + idCount)}
|
||||||
|
className='search-channel__name'
|
||||||
|
>
|
||||||
|
{channelName}
|
||||||
|
</div>
|
||||||
<div className='post__content'>
|
<div className='post__content'>
|
||||||
{profilePicContainer}
|
{profilePicContainer}
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -691,6 +691,7 @@ export default class Sidebar extends React.Component {
|
|||||||
var directMessageMore = (
|
var directMessageMore = (
|
||||||
<li key='more'>
|
<li key='more'>
|
||||||
<a
|
<a
|
||||||
|
id='moreDirectMessage'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.handleOpenMoreDirectChannelsModal}
|
onClick={this.handleOpenMoreDirectChannelsModal}
|
||||||
>
|
>
|
||||||
@@ -749,6 +750,7 @@ export default class Sidebar extends React.Component {
|
|||||||
overlay={createChannelTootlip}
|
overlay={createChannelTootlip}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
|
id='createPublicChannel'
|
||||||
className='add-channel-btn'
|
className='add-channel-btn'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.showNewChannelModal.bind(this, Constants.OPEN_CHANNEL)}
|
onClick={this.showNewChannelModal.bind(this, Constants.OPEN_CHANNEL)}
|
||||||
@@ -766,6 +768,7 @@ export default class Sidebar extends React.Component {
|
|||||||
overlay={createGroupTootlip}
|
overlay={createGroupTootlip}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
|
id='createPrivateChannel'
|
||||||
className='add-channel-btn'
|
className='add-channel-btn'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.showNewChannelModal.bind(this, Constants.PRIVATE_CHANNEL)}
|
onClick={this.showNewChannelModal.bind(this, Constants.PRIVATE_CHANNEL)}
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ exports[`components/NewChannelModal should match snapshot, modal not showing 1`]
|
|||||||
<input
|
<input
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
className="form-control"
|
className="form-control"
|
||||||
|
id="newPublicChannelName"
|
||||||
maxLength={22}
|
maxLength={22}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"Bugs\\", \\"Marketing\\", \\"客户支持\\""
|
placeholder="E.g.: \\"Bugs\\", \\"Marketing\\", \\"客户支持\\""
|
||||||
@@ -147,6 +148,7 @@ exports[`components/NewChannelModal should match snapshot, modal not showing 1`]
|
|||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
className="form-control no-resize"
|
className="form-control no-resize"
|
||||||
|
id="newPublicChannelPurpose"
|
||||||
maxLength="250"
|
maxLength="250"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"A channel to file bugs and improvements\\""
|
placeholder="E.g.: \\"A channel to file bugs and improvements\\""
|
||||||
@@ -195,6 +197,7 @@ exports[`components/NewChannelModal should match snapshot, modal not showing 1`]
|
|||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
className="form-control no-resize"
|
className="form-control no-resize"
|
||||||
|
id="newPublicChannelHeader"
|
||||||
maxLength="1024"
|
maxLength="1024"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"[Link Title](http://example.com)\\""
|
placeholder="E.g.: \\"[Link Title](http://example.com)\\""
|
||||||
@@ -339,6 +342,7 @@ exports[`components/NewChannelModal should match snapshot, modal showing 1`] = `
|
|||||||
<input
|
<input
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
className="form-control"
|
className="form-control"
|
||||||
|
id="newPublicChannelName"
|
||||||
maxLength={22}
|
maxLength={22}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"Bugs\\", \\"Marketing\\", \\"客户支持\\""
|
placeholder="E.g.: \\"Bugs\\", \\"Marketing\\", \\"客户支持\\""
|
||||||
@@ -394,6 +398,7 @@ exports[`components/NewChannelModal should match snapshot, modal showing 1`] = `
|
|||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
className="form-control no-resize"
|
className="form-control no-resize"
|
||||||
|
id="newPublicChannelPurpose"
|
||||||
maxLength="250"
|
maxLength="250"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"A channel to file bugs and improvements\\""
|
placeholder="E.g.: \\"A channel to file bugs and improvements\\""
|
||||||
@@ -442,6 +447,7 @@ exports[`components/NewChannelModal should match snapshot, modal showing 1`] = `
|
|||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
className="form-control no-resize"
|
className="form-control no-resize"
|
||||||
|
id="newPublicChannelHeader"
|
||||||
maxLength="1024"
|
maxLength="1024"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"[Link Title](http://example.com)\\""
|
placeholder="E.g.: \\"[Link Title](http://example.com)\\""
|
||||||
@@ -586,6 +592,7 @@ exports[`components/NewChannelModal should match snapshot, private channel fille
|
|||||||
<input
|
<input
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
className="form-control"
|
className="form-control"
|
||||||
|
id="newPrivateChannelName"
|
||||||
maxLength={22}
|
maxLength={22}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"Bugs\\", \\"Marketing\\", \\"客户支持\\""
|
placeholder="E.g.: \\"Bugs\\", \\"Marketing\\", \\"客户支持\\""
|
||||||
@@ -641,6 +648,7 @@ exports[`components/NewChannelModal should match snapshot, private channel fille
|
|||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
className="form-control no-resize"
|
className="form-control no-resize"
|
||||||
|
id="newPrivateChannelPurpose"
|
||||||
maxLength="250"
|
maxLength="250"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"A channel to file bugs and improvements\\""
|
placeholder="E.g.: \\"A channel to file bugs and improvements\\""
|
||||||
@@ -689,6 +697,7 @@ exports[`components/NewChannelModal should match snapshot, private channel fille
|
|||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
className="form-control no-resize"
|
className="form-control no-resize"
|
||||||
|
id="newPrivateChannelHeader"
|
||||||
maxLength="1024"
|
maxLength="1024"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="E.g.: \\"[Link Title](http://example.com)\\""
|
placeholder="E.g.: \\"[Link Title](http://example.com)\\""
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user