mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix flaky cypress test
This commit is contained in:
parent
4f7d5ee24f
commit
7181f03fdf
@ -49,26 +49,20 @@ When('I click on "Report Post" from the content menu of the post', () => {
|
|||||||
.click()
|
.click()
|
||||||
})
|
})
|
||||||
|
|
||||||
When(
|
When('I click on "Report User" from the content menu in the user info box', () => {
|
||||||
'I click on "Report User" from the content menu in the user info box',
|
cy.contains('.ds-card', davidIrvingPostTitle)
|
||||||
() => {
|
.get('.user-content-menu .content-menu-trigger')
|
||||||
// wait client-side-rendered content
|
.click({ force: true })
|
||||||
cy.get('.ds-card-content .content-menu button').should('exist')
|
|
||||||
|
|
||||||
cy.contains('.ds-card-content', davidIrvingName)
|
|
||||||
.find('.content-menu button').click()
|
|
||||||
|
|
||||||
cy.get('.popover .ds-menu-item-link')
|
cy.get('.popover .ds-menu-item-link')
|
||||||
.contains('Report User')
|
.contains('Report User')
|
||||||
.click()
|
.click()
|
||||||
}
|
})
|
||||||
)
|
|
||||||
|
|
||||||
When('I click on the author', () => {
|
When('I click on the author', () => {
|
||||||
cy.get('a.user')
|
cy.get('.username')
|
||||||
.first()
|
|
||||||
.click()
|
.click()
|
||||||
.wait(200)
|
.url().should('include', '/profile/')
|
||||||
})
|
})
|
||||||
|
|
||||||
When('I report the author', () => {
|
When('I report the author', () => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Feature: Report and Moderate
|
Feature: Report and Moderate
|
||||||
As a user
|
As a user
|
||||||
I would like to report content that viloates the community guidlines
|
I would like to report content that violates the community guidlines
|
||||||
So the moderators can take action on it
|
So the moderators can take action on it
|
||||||
|
|
||||||
As a moderator
|
As a moderator
|
||||||
@ -12,6 +12,7 @@ Feature: Report and Moderate
|
|||||||
| Author | id | title | content |
|
| Author | id | title | content |
|
||||||
| David Irving | p1 | The Truth about the Holocaust | It never existed! |
|
| David Irving | p1 | The Truth about the Holocaust | It never existed! |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Report a post from various pages
|
Scenario Outline: Report a post from various pages
|
||||||
Given I am logged in with a "user" role
|
Given I am logged in with a "user" role
|
||||||
When I see David Irving's post on the <Page>
|
When I see David Irving's post on the <Page>
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
resource-type="user"
|
resource-type="user"
|
||||||
:resource="user"
|
:resource="user"
|
||||||
:is-owner="myProfile"
|
:is-owner="myProfile"
|
||||||
|
class="user-content-menu"
|
||||||
/>
|
/>
|
||||||
</no-ssr>
|
</no-ssr>
|
||||||
<ds-space margin="small">
|
<ds-space margin="small">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user