mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Modify cypress tests, attempt to get them to work
- they are still not triggering a change in form.content, therefore sending an empty string and either failing the back end validations, or if removed creating a comment with an empty string
This commit is contained in:
parent
7fafa1eb6e
commit
bc35ab835f
@ -1,20 +1,13 @@
|
||||
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
|
||||
|
||||
When('I should be able to post a comment', () => {
|
||||
cy.get('[contenteditable]')
|
||||
.type('This is a comment')
|
||||
// .get('.ds-form')
|
||||
// .submit()
|
||||
.get('button')
|
||||
.contains('Submit Comment')
|
||||
.click()
|
||||
.get('.iziToast-message')
|
||||
Then('my comment should be successfully created', () => {
|
||||
cy.get('.iziToast-message')
|
||||
.contains('Comment Submitted')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Then('I should see my comment', () => {
|
||||
cy.get('div.comment p')
|
||||
.should('contain', 'This is a comment')
|
||||
.should('contain', 'Human Connection rocks')
|
||||
})
|
||||
|
||||
Then('the editor should be cleared', () => {
|
||||
|
||||
@ -12,6 +12,11 @@ Feature: Post Comment
|
||||
|
||||
Scenario: Comment creation
|
||||
Given I visit "post/bWBjpkTKZp/101-essays"
|
||||
Then I should be able to post a comment
|
||||
And I type in the following text:
|
||||
"""
|
||||
Human Connection rocks
|
||||
"""
|
||||
And I click on "Submit Comment"
|
||||
Then my comment should be successfully created
|
||||
And I should see my comment
|
||||
And the editor should be cleared
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user