diff --git a/cypress/integration/common/post.js b/cypress/integration/common/post.js index ca7e62b30..f6a1bbedd 100644 --- a/cypress/integration/common/post.js +++ b/cypress/integration/common/post.js @@ -23,17 +23,3 @@ Then('the editor should be cleared', () => { cy.get('.ProseMirror p') .should('have.class', 'is-empty') }) - -Then('I rapidly double click on the {string} button', text => { - cy.get('button').contains(text).click().click() -}) - -Then('I should see my comment once', () => { - cy.get('div.comment p') - .should('contain', 'Human Connection rocks') - .and('have.length', 1) - .get('.ds-avatar img') - .should('have.attr', 'src') - .and('contain', narratorAvatar) - .and('have.length', 1) -}) \ No newline at end of file diff --git a/cypress/integration/post/Comment.feature b/cypress/integration/post/Comment.feature index afac543d9..e7e462824 100644 --- a/cypress/integration/post/Comment.feature +++ b/cypress/integration/post/Comment.feature @@ -20,14 +20,3 @@ Feature: Post Comment Then my comment should be successfully created And I should see my comment And the editor should be cleared - - Scenario: Prevention of multiple comment creation - Given I visit "post/bWBjpkTKZp/101-essays" - And I type in the following text: - """ - Human Connection rocks - """ - And I rapidly double click on the "Comment" button - Then my comment should be successfully created - And I should see my comment once - And the editor should be cleared diff --git a/webapp/components/comments/CommentForm/index.vue b/webapp/components/comments/CommentForm/index.vue index 3efb3a625..d59314e07 100644 --- a/webapp/components/comments/CommentForm/index.vue +++ b/webapp/components/comments/CommentForm/index.vue @@ -79,7 +79,7 @@ export default { }, handleSubmit() { this.loading = true - this.loading = false + this.disabled = true this.$apollo .mutate({ mutation: gql`