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
This commit is contained in:
Ashish Gupta 2023-11-05 10:49:22 +05:30 committed by GitHub
parent 1cbcdd01d2
commit c5e7ff4c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);