mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
- the editor only clears once, also there are some other bugs associated with clearing it this way - according to https://github.com/scrumpy/tiptap/issues/21 there should be a clearContent(), but haven't been able to get it to work - cypress test for some reason is with a weird bug where I need to submit the form, then click on the submit button, otherwise it doesn't call the handleSubmit method
19 lines
459 B
JavaScript
19 lines
459 B
JavaScript
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
|
|
|
|
When('I should be able to post a comment', () => {
|
|
cy.get('.ProseMirror')
|
|
.type('This is a comment')
|
|
.get('.ds-form')
|
|
.submit()
|
|
.get('button')
|
|
.contains('Submit Comment')
|
|
.click()
|
|
.get('.iziToast-message')
|
|
.contains('Comment Submitted')
|
|
})
|
|
|
|
Then('I should see my comment', () => {
|
|
cy.get('div.comment p')
|
|
.should('contain', 'This is a comment')
|
|
})
|