mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
test if avatar menu is visible and scroll top
This commit is contained in:
parent
f5c05de974
commit
66c74fbb09
@ -1,7 +1,13 @@
|
|||||||
import { Then } from "cypress-cucumber-preprocessor/steps";
|
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 => {
|
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').click() // open
|
||||||
cy.get('.avatar-menu-popover').contains(name)
|
cy.get('.avatar-menu-popover').contains(name)
|
||||||
cy.get('.avatar-menu').click() // close again
|
cy.get('.avatar-menu').click() // close again
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user