mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Search for button with text "Comment" in cypress test
This commit is contained in:
parent
8d7fdec17f
commit
30d0ff3cc7
@ -1,5 +1,9 @@
|
|||||||
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
|
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', () => {
|
Then('my comment should be successfully created', () => {
|
||||||
cy.get('.iziToast-message')
|
cy.get('.iziToast-message')
|
||||||
.contains('Comment Submitted')
|
.contains('Comment Submitted')
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Feature: Post Comment
|
|||||||
"""
|
"""
|
||||||
Human Connection rocks
|
Human Connection rocks
|
||||||
"""
|
"""
|
||||||
And I click on "Comment"
|
And I click on the "Comment" button
|
||||||
Then my comment should be successfully created
|
Then my comment should be successfully created
|
||||||
And I should see my comment
|
And I should see my comment
|
||||||
And the editor should be cleared
|
And the editor should be cleared
|
||||||
|
|||||||
@ -125,7 +125,10 @@
|
|||||||
icon="messages"
|
icon="messages"
|
||||||
/>
|
/>
|
||||||
<ds-space margin-bottom="large" />
|
<ds-space margin-bottom="large" />
|
||||||
<hc-comment-form :post="post" @addComment="addComment" />
|
<hc-comment-form
|
||||||
|
:post="post"
|
||||||
|
@addComment="addComment"
|
||||||
|
/>
|
||||||
</ds-section>
|
</ds-section>
|
||||||
</ds-card>
|
</ds-card>
|
||||||
</transition>
|
</transition>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user