Add cypress step to check the editor is cleared

This commit is contained in:
Matt Rider 2019-04-23 18:19:11 -03:00
parent 20112bdd9b
commit 3b00a34199
2 changed files with 9 additions and 3 deletions

View File

@ -15,4 +15,9 @@ When('I should be able to post a comment', () => {
Then('I should see my comment', () => { Then('I should see my comment', () => {
cy.get('div.comment p') cy.get('div.comment p')
.should('contain', 'This is a comment') .should('contain', 'This is a comment')
}) })
Then('the editor should be cleared', () => {
cy.get('.ProseMirror p')
.should('have.class', 'is-empty')
})

View File

@ -10,7 +10,8 @@ Feature: Post Comment
And I have a user account And I have a user account
And I am logged in And I am logged in
Scenario: Scenario: Comment creation
Given I visit "post/bWBjpkTKZp/101-essays" Given I visit "post/bWBjpkTKZp/101-essays"
Then I should be able to post a comment Then I should be able to post a comment
And I should see my comment And I should see my comment
And the editor should be cleared