mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +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'
|
||||
|
||||
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')
|
||||
|
||||
@ -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
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
/>
|
||||
</no-ssr>
|
||||
<ds-space />
|
||||
<ds-flex :gutter="{ base: 'small', md: 'small', sm: 'x-large', xs: 'x-large' }" >
|
||||
<ds-flex-item :width="{ base: '0%', md: '50%', sm: '0%', xs: '0%' }" />
|
||||
<ds-flex-item :width="{ base: '40%', md: '20%', sm: '30%', xs: '30%' }" >
|
||||
<ds-flex :gutter="{ base: 'small', md: 'small', sm: 'x-large', xs: 'x-large' }">
|
||||
<ds-flex-item :width="{ base: '0%', md: '50%', sm: '0%', xs: '0%' }" />
|
||||
<ds-flex-item :width="{ base: '40%', md: '20%', sm: '30%', xs: '30%' }">
|
||||
<ds-button
|
||||
:disabled="disabled"
|
||||
ghost
|
||||
@ -25,7 +25,7 @@
|
||||
{{ $t('actions.cancel') }}
|
||||
</ds-button>
|
||||
</ds-flex-item>
|
||||
<ds-flex-item :width="{ base: '40%', md: '20%', sm: '40%', xs: '40%' }" >
|
||||
<ds-flex-item :width="{ base: '40%', md: '20%', sm: '40%', xs: '40%' }">
|
||||
<ds-button
|
||||
type="submit"
|
||||
:disabled="disabled || errors"
|
||||
|
||||
@ -125,7 +125,10 @@
|
||||
icon="messages"
|
||||
/>
|
||||
<ds-space margin-bottom="large" />
|
||||
<hc-comment-form :post="post" @addComment="addComment" />
|
||||
<hc-comment-form
|
||||
:post="post"
|
||||
@addComment="addComment"
|
||||
/>
|
||||
</ds-section>
|
||||
</ds-card>
|
||||
</transition>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user