Fix? flaky cypress by waiting for <no-ssr> content

Content menu is a client-side rendered component. Maybe an extra
assertion will wait for it? That's how you can flix flaky cucumbers if
you use capybara.
This commit is contained in:
Robert Schäfer 2019-04-18 19:05:36 +02:00
parent 6cd8a4ef21
commit 4f7d5ee24f

View File

@ -52,10 +52,11 @@ When('I click on "Report Post" from the content menu of the post', () => {
When(
'I click on "Report User" from the content menu in the user info box',
() => {
cy.contains('.ds-card', davidIrvingName)
.find('.content-menu-trigger')
.first()
.click({force: true})
// wait client-side-rendered content
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')
.contains('Report User')