diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js b/cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js index b9e97a304..ca6b4798b 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js +++ b/cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js @@ -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 -}) \ No newline at end of file +})