Skip to content

Commit

Permalink
Rearranged scrollIntoView ordertobe be before visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
asr0393 committed Oct 30, 2024
1 parent f6fa12d commit 13f8318
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/cypress/integration/notifications.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@
.should('be.visible')
.and('contain.text', 'Included FREE in your plan!');
cy.get('.ai-sitegen-modal__footer__content__buttons').eq(0).should('exist')
cy.get('button.ai-sitegen-modal__header__close-button').should('be.visible')
.scrollIntoView().click();
cy.get('button.ai-sitegen-modal__header__close-button').scrollIntoView().should('be.visible').click();
cy.get('.ai-sitegen-modal').should('not.visible');
}
});
Expand All @@ -155,10 +154,10 @@
cy.reload();
cy.wait( '@notifications' );
cy.wait( 2000 );
cy.get('.ai-sitegen-modal__footer__content__buttons__try-now')
cy.get('button.ai-sitegen-modal__footer__content__buttons__try-now').scrollIntoView()
.should('be.visible')
.and('contain', 'TRY NOW')
.scrollIntoView().click();
.click();
cy.url().should('include','/index.php?page=nfd-onboarding#/wp-setup/step/fork');
cy.get('.nfd-onboarding-sitegen-options__option--large').should('be.visible');
}
Expand All @@ -182,10 +181,10 @@
);
cy.wait( '@notifications' );
cy.wait( 2000 );
cy.get('button.ai-sitegen-modal__footer__content__buttons__no-thanks')
cy.get('button.ai-sitegen-modal__footer__content__buttons__no-thanks').scrollIntoView()
.should('be.visible')
.and('contain', 'NO, THANKS')
.scrollIntoView().click();
.click();
cy.get('.ai-sitegen-modal').should('not.visible');
}
});
Expand Down

0 comments on commit 13f8318

Please sign in to comment.