test if avatar menu is visible and scroll top

This commit is contained in:
Moriz Wahl 2023-02-06 12:09:30 +01:00
parent f5c05de974
commit 66c74fbb09

View File

@ -1,7 +1,13 @@
import { Then } from "cypress-cucumber-preprocessor/steps";
Then('I can see my new name {string} when I click on my profile picture in the top right', name => {
cy.get(".avatar-menu").then(($menu) => {
if (!$menu.is(':visible')){
cy.scrollTo("top");
cy.wait(500);
}
})
cy.get('.avatar-menu').click() // open
cy.get('.avatar-menu-popover').contains(name)
cy.get('.avatar-menu').click() // close again
})
})