diff --git a/client/coral-embed-stream/src/components/Embed.js b/client/coral-embed-stream/src/components/Embed.js index 7445bf300..22c6146bd 100644 --- a/client/coral-embed-stream/src/components/Embed.js +++ b/client/coral-embed-stream/src/components/Embed.js @@ -38,7 +38,7 @@ export default class Embed extends React.Component { ]; if (can(user, 'UPDATE_CONFIG')) { tabs.push( - + {t('framework.configure_stream')} ); @@ -90,7 +90,7 @@ export default class Embed extends React.Component { , - + , ]} @@ -101,8 +101,18 @@ export default class Embed extends React.Component { } Embed.propTypes = { + setActiveTab: PropTypes.func, + auth: PropTypes.object, + blurSignInDialog: PropTypes.func, + focusSignInDialog: PropTypes.func, + hideSignInDialog: PropTypes.func, + router: PropTypes.object, + commentId: PropTypes.string, + root: PropTypes.object, + activeTab: PropTypes.string, data: PropTypes.shape({ loading: PropTypes.bool, - error: PropTypes.object + error: PropTypes.object, + refetch: PropTypes.func, }).isRequired }; diff --git a/client/coral-embed-stream/src/tabs/configure/components/AssetStatusInfo.js b/client/coral-embed-stream/src/tabs/configure/components/AssetStatusInfo.js index d3c2f14d7..81221dfe3 100644 --- a/client/coral-embed-stream/src/tabs/configure/components/AssetStatusInfo.js +++ b/client/coral-embed-stream/src/tabs/configure/components/AssetStatusInfo.js @@ -46,14 +46,16 @@ class AssetStatusInfo extends React.Component { render() { const {isClosed, closedAt, onClose, onOpen} = this.props; return ( -
+

{!isClosed ? t('configure.close') : t('configure.open')} {t('configure.comment_stream')}

{(!isClosed && closedAt) ?

{t('configure.comment_stream_will_close')} {timeago(new Date(closedAt))}.

: ''} -
+

{!isClosed ? t('configure.open_stream_configuration') : t('configure.close_stream_configuration')}

-
diff --git a/client/coral-embed-stream/src/tabs/stream/components/Comment.js b/client/coral-embed-stream/src/tabs/stream/components/Comment.js index ba14e3c7f..9748747f0 100644 --- a/client/coral-embed-stream/src/tabs/stream/components/Comment.js +++ b/client/coral-embed-stream/src/tabs/stream/components/Comment.js @@ -547,6 +547,7 @@ export default class Comment extends React.Component { queryData={queryData} inline /> + {!disableReply &&
+
+ { return (
- +
{children}
diff --git a/locales/en.yml b/locales/en.yml index a4238d5c0..0da121202 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -10,7 +10,7 @@ en: cancel: "Cancel" note: "Note: {0}" note_reject_comment: "Banning this user will also place this comment in the Rejected queue." - note_ban_user: "Banning this user will not let them edit comment or remove anything." + note_ban_user: "Banning this user will not let them comment, react to, or report comments." yes_ban_user: "Yes, Ban User" write_a_message: "Write a message" send: "Send" diff --git a/plugins/talk-plugin-featured-comments/client/components/ModTag.css b/plugins/talk-plugin-featured-comments/client/components/ModTag.css index 683c16570..960985e0d 100644 --- a/plugins/talk-plugin-featured-comments/client/components/ModTag.css +++ b/plugins/talk-plugin-featured-comments/client/components/ModTag.css @@ -7,11 +7,11 @@ padding: 0px 5px; border-radius: 2px; font-size: 12px; - height: 24px; + height: 26px; transition: background-color .2s cubic-bezier(.4,0,.2,1), color .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1); margin: 2px 0px; letter-spacing: 0.4px; - + line-height: 25px; } .tag:hover { @@ -38,5 +38,5 @@ .tagIcon { margin-right: 5px; font-size: 15px; - vertical-align: text-bottom; + vertical-align: sub; } diff --git a/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css b/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css index 4f3d8e9da..1a291d5e3 100644 --- a/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css +++ b/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css @@ -16,6 +16,7 @@ padding: 0; margin: 0 0 8px 0; font-size: 15px; + word-wrap: break-word; } .button { diff --git a/test/e2e/page_objects/embedStream.js b/test/e2e/page_objects/embedStream.js index 4875eec45..e07ba0e65 100644 --- a/test/e2e/page_objects/embedStream.js +++ b/test/e2e/page_objects/embedStream.js @@ -8,6 +8,12 @@ module.exports = { this.expect.section('@comments').to.be.visible; return this.section.comments; }, + goToConfigSection: function() { + this.waitForElementVisible('@configTabButton'); + this.click('@configTabButton'); + this.expect.section('@config').to.be.visible; + return this.section.config; + }, goToProfileSection: function() { this.waitForElementVisible('@profileTabButton'); this.click('@profileTabButton'); @@ -42,6 +48,7 @@ module.exports = { iframe: `#${iframeId}`, commentsTabButton: '.talk-embed-stream-comments-tab > button', profileTabButton: '.talk-embed-stream-profile-tab > button', + configTabButton: '.talk-embed-stream-config-tab > button', banDialog: '.talk-ban-user-dialog', banDialogConfirmButton: '.talk-ban-user-dialog-button-confirm', }, @@ -95,6 +102,7 @@ module.exports = { firstComment: '.talk-stream-comment.talk-stream-comment-level-0', firstCommentContent: '.talk-stream-comment.talk-stream-comment-level-0 .talk-stream-comment-content', flagButton: '.talk-stream-comment.talk-stream-comment-level-0 .talk-plugin-flags-button', + replyButton: '.talk-stream-comment.talk-stream-comment-level-0 .talk-plugin-replies-reply-button', respectButton: '.talk-stream-comment.talk-stream-comment-level-0 .talk-stream-comment-footer .talk-plugin-respect-button', restrictedMessageBox: '.talk-restricted-message-box', changeUsernameInput: '.talk-change-username-username-input', @@ -132,5 +140,26 @@ module.exports = { myCommentHistoryComment: '.talk-my-profile-comment-history .my-comment-body', }, }, + config: { + selector: '.talk-embed-stream-config-tab-pane', + elements: { + openStream: '.talk-config-close-comments-open-button', + closeStream: '.talk-config-close-comments-close-button', + }, + commands: [{ + openStream: function() { + this.waitForElementVisible('@openStream'); + this.click('@openStream'); + this.waitForElementVisible('@closeStream'); + return this.section.config; + }, + closeStream: function() { + this.waitForElementVisible('@closeStream'); + this.click('@closeStream'); + this.waitForElementVisible('@openStream'); + return this.section.config; + }, + }] + }, }, }; diff --git a/test/e2e/specs/03_embedStream.js b/test/e2e/specs/03_embedStream.js index 073456b0f..ee870033a 100644 --- a/test/e2e/specs/03_embedStream.js +++ b/test/e2e/specs/03_embedStream.js @@ -111,4 +111,42 @@ module.exports = { profile .assert.visible('@notLoggedIn'); }, + 'admin logs in': (client) => { + const {testData: {admin}} = client.globals; + const embedStream = client.page.embedStream(); + + embedStream + .navigate() + .ready() + .openLoginPopup((popup) => popup.login(admin)); + }, + 'admin closes stream, users won\'t be able to perform some actions: reply ': (client) => { + + const embedStream = client.page.embedStream(); + + embedStream + .goToCommentsSection() + .waitForElementVisible('@firstComment') + .waitForElementVisible('@replyButton'); + + embedStream + .goToConfigSection() + .closeStream(); + + embedStream + .goToCommentsSection() + .waitForElementVisible('@firstComment') + .waitForElementNotPresent('@replyButton'); + + embedStream + .goToConfigSection() + .openStream(); + }, + 'admin logs out': (client) => { + const embedStream = client.page.embedStream(); + const comments = embedStream.goToCommentsSection(); + + comments + .logout(); + }, };