Adding a last message id for selenium testing (#5840)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
7d449e0556
Коммит
37c41a26c9
@@ -283,6 +283,7 @@ export default class Post extends React.Component {
|
||||
post={post}
|
||||
currentUser={this.props.currentUser}
|
||||
sameRoot={this.props.sameRoot}
|
||||
isLastPost={this.props.isLastPost}
|
||||
parentPost={parentPost}
|
||||
handleCommentClick={this.handleCommentClick}
|
||||
compactDisplay={this.props.compactDisplay}
|
||||
@@ -305,6 +306,7 @@ Post.propTypes = {
|
||||
sameUser: React.PropTypes.bool,
|
||||
sameRoot: React.PropTypes.bool,
|
||||
hideProfilePic: React.PropTypes.bool,
|
||||
isLastPost: React.PropTypes.bool,
|
||||
isLastComment: React.PropTypes.bool,
|
||||
shouldHighlight: React.PropTypes.bool,
|
||||
displayNameType: React.PropTypes.string,
|
||||
|
||||
@@ -163,7 +163,10 @@ export default class PostBody extends React.Component {
|
||||
className={postClass}
|
||||
>
|
||||
{loading}
|
||||
<PostMessageContainer post={this.props.post}/>
|
||||
<PostMessageContainer
|
||||
isLastPost={this.props.isLastPost}
|
||||
post={this.props.post}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -208,6 +211,7 @@ PostBody.propTypes = {
|
||||
currentUser: React.PropTypes.object.isRequired,
|
||||
parentPost: React.PropTypes.object,
|
||||
retryPost: React.PropTypes.func,
|
||||
isLastPost: React.PropTypes.bool,
|
||||
handleCommentClick: React.PropTypes.func.isRequired,
|
||||
compactDisplay: React.PropTypes.bool,
|
||||
previewCollapsed: React.PropTypes.string,
|
||||
|
||||
@@ -331,6 +331,7 @@ export default class PostList extends React.Component {
|
||||
<Post
|
||||
key={keyPrefix + 'postKey'}
|
||||
ref={post.id}
|
||||
isLastPost={i === 0}
|
||||
sameUser={sameUser}
|
||||
sameRoot={sameRoot}
|
||||
post={post}
|
||||
|
||||
@@ -15,7 +15,8 @@ import PostMessageView from './post_message_view.jsx';
|
||||
export default class PostMessageContainer extends React.Component {
|
||||
static propTypes = {
|
||||
post: React.PropTypes.object.isRequired,
|
||||
options: React.PropTypes.object
|
||||
options: React.PropTypes.object,
|
||||
isLastPost: React.PropTypes.bool
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@@ -90,6 +91,7 @@ export default class PostMessageContainer extends React.Component {
|
||||
<PostMessageView
|
||||
options={this.props.options}
|
||||
post={this.props.post}
|
||||
isLastPost={this.props.isLastPost}
|
||||
emojis={this.state.emojis}
|
||||
enableFormatting={this.state.enableFormatting}
|
||||
mentionKeys={this.state.mentionKeys}
|
||||
|
||||
@@ -21,7 +21,8 @@ export default class PostMessageView extends React.Component {
|
||||
mentionKeys: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
|
||||
usernameMap: React.PropTypes.object.isRequired,
|
||||
channelNamesMap: React.PropTypes.object.isRequired,
|
||||
team: React.PropTypes.object.isRequired
|
||||
team: React.PropTypes.object.isRequired,
|
||||
isLastPost: React.PropTypes.bool
|
||||
};
|
||||
|
||||
shouldComponentUpdate(nextProps) {
|
||||
@@ -113,6 +114,7 @@ export default class PostMessageView extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
<span
|
||||
id={this.props.isLastPost ? 'lastPostMessageText' : null}
|
||||
className='post-message__text'
|
||||
onClick={Utils.handleFormattedTextClick}
|
||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.props.post.message, options)}}
|
||||
|
||||
Ссылка в новой задаче
Block a user