From ad46c2d059671b43c81cfb51f0bfc42590a61f90 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Sun, 5 May 2019 12:26:02 -0300 Subject: [PATCH] Remove cypress test - it is not part of the scope of this ticket, and therefore should be extracted and dealt with separately --- cypress/integration/common/post.js | 14 -------------- cypress/integration/post/Comment.feature | 11 ----------- webapp/components/comments/CommentForm/index.vue | 2 +- 3 files changed, 1 insertion(+), 26 deletions(-) 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`