diff --git a/cypress/integration/common/post.js b/cypress/integration/common/post.js index 23a7d5764..85a9f3339 100644 --- a/cypress/integration/common/post.js +++ b/cypress/integration/common/post.js @@ -1,5 +1,9 @@ import { When, Then } from 'cypress-cucumber-preprocessor/steps' +Then('I click on the {string} button', text => { + cy.get('button').contains(text).click() +}) + Then('my comment should be successfully created', () => { cy.get('.iziToast-message') .contains('Comment Submitted') diff --git a/cypress/integration/post/Comment.feature b/cypress/integration/post/Comment.feature index 9d76a8cef..e7e462824 100644 --- a/cypress/integration/post/Comment.feature +++ b/cypress/integration/post/Comment.feature @@ -16,7 +16,7 @@ Feature: Post Comment """ Human Connection rocks """ - And I click on "Comment" + And I click on the "Comment" button Then my comment should be successfully created And I should see my comment And the editor should be cleared diff --git a/webapp/components/CommentForm/index.vue b/webapp/components/CommentForm/index.vue index b1f3ddf80..3c73300c2 100644 --- a/webapp/components/CommentForm/index.vue +++ b/webapp/components/CommentForm/index.vue @@ -14,9 +14,9 @@ /> - - - + + + - + - +