Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When modal link is clicked before banner animates, both modal and banner render #3488

Closed
eastandwestwind opened this issue Jun 7, 2023 · 2 comments · Fixed by #3521
Closed
Assignees

Comments

@eastandwestwind
Copy link
Contributor

          this is a little subtle—the banner always exists, we just move it out of the screen so that we can animate it. the odd thing is that without this change, the env would end up as
image

showing both the modal and overlay. I think what is happening is

  1. the page loads, the banner does not appear yet because it is still animating in
  2. cypress clicks on the modal link, so the modal opens (also sets that the banner should not be open, but I think at this point the banner isn't technically open yet because of delayBanner)
  3. now the banner has finished animating so both the modal and banner are open!

by waiting for the banner to be visible, that delays cypress enough so that the banner is set to open, then the logic all works accordingly.

this is probably a bug, so maybe it should be skipped instead of the fix I put in 🤔 let me know what you think @eastandwestwind . I think if a user were very speedy, they could trigger this by clicking on the modal link before the banner has appeared

Originally posted by @allisonking in #3487 (comment)

@allisonking
Copy link
Contributor

For a Cypress test case, revert the first line of

it("closes banner and opens modal when modal link is clicked", () => {
cy.get("div#fides-banner").should("be.visible");
cy.contains("button", "Accept Test").should("exist");
cy.get("#fides-modal-link").click();
cy.get("div#fides-banner").should("not.be.visible");
cy.getByTestId("consent-modal");
});

from be.visible --> exist

@Roger-Ethyca
Copy link
Contributor

moving to done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants