From c5e7ff4c703ca77f67c0e709ec5b6512fc5a019c Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Sun, 5 Nov 2023 10:49:22 +0530 Subject: [PATCH] fix(cypress): what's new pop-up alert box (#13848) * fix(cypress): what's new popoup alert box * remove manual timeout as not required such --- .../src/main/resources/ui/cypress/support/commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js b/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js index 9bff713af4e..617f35eeb4e 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js @@ -81,9 +81,9 @@ Cypress.Commands.add('goToHomePage', (doNotNavigate) => { interceptURL('GET', '/api/v1/feed*', 'feed'); interceptURL('GET', '/api/v1/users/*?fields=*', 'userProfile'); !doNotNavigate && cy.visit('/'); - cy.get('[data-testid="whats-new-alert-card"]', { - timeout: 500, // need to add timeout as alert pop-oup card has an 1s of animation to appear on screen - }).should('be.visible'); + cy.get('[data-testid="whats-new-alert-card"]') + .scrollIntoView() + .should('be.visible'); cy.get('[data-testid="close-whats-new-alert"]').click(); cy.get('[data-testid="whats-new-alert-card"]').should('not.exist'); // verifyResponseStatusCode('@feed', 200);