From 8db7ff76941e6124df208497045074da1d165d63 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Wed, 20 Feb 2019 09:37:24 +0800 Subject: [PATCH] add commands, test specs for post header, and upgrade Cypress to 3.1.5 due to Chrome 72 issue (#2389) --- components/common/comment_icon.jsx | 5 +- .../__snapshots__/dot_menu.test.jsx.snap | 2 + components/dot_menu/dot_menu.jsx | 1 + .../__snapshots__/post_flag_icon.test.js.snap | 4 +- .../post_flag_icon/post_flag_icon.js | 2 +- .../__snapshots__/post_info.test.jsx.snap | 4 +- components/post_view/post_info/post_info.jsx | 2 +- components/post_view/post_time/post_time.jsx | 12 +- .../rhs_header_post/rhs_header_post.jsx | 1 + components/rhs_thread/rhs_thread.jsx | 1 + .../search_results_item.test.jsx.snap | 10 +- .../search_results_item.jsx | 2 + .../post_header/post_header_spec.js | 161 ++++++++++++++++++ cypress/support/commands.js | 85 +++++++++ package-lock.json | 30 ++-- package.json | 2 +- 16 files changed, 295 insertions(+), 29 deletions(-) create mode 100644 cypress/integration/post_header/post_header_spec.js diff --git a/components/common/comment_icon.jsx b/components/common/comment_icon.jsx index 37c6e3fc4927..e4591b1f889a 100644 --- a/components/common/comment_icon.jsx +++ b/components/common/comment_icon.jsx @@ -16,7 +16,7 @@ export default class CommentIcon extends React.PureComponent { handleCommentClick: PropTypes.func.isRequired, searchStyle: PropTypes.string, commentCount: PropTypes.number, - id: PropTypes.string, + postId: PropTypes.string, extraClass: PropTypes.string, }; @@ -24,7 +24,6 @@ export default class CommentIcon extends React.PureComponent { idCount: -1, searchStyle: '', commentCount: 0, - id: '', extraClass: '', }; @@ -47,7 +46,7 @@ export default class CommentIcon extends React.PureComponent { selectorId += this.props.idCount; } - const id = Utils.createSafeId(this.props.idPrefix + '_' + this.props.id); + const id = Utils.createSafeId(this.props.idPrefix + '_' + this.props.postId); const tooltip = (