Skip to content

add exit intent example #453

Open
Open
@CypressCecelia

Description

@CypressCecelia

Add example for testing a modal or event that occurs when a user signals intent to exit the page by leaving the window with their mouse.

Need to create an example to test against, sample code below.

describe("Exit Intent test", function () {
it("should display modal on mouse exit", function () {
cy.visit("https://the-internet.herokuapp.com/exit_intent");
// Mouse into the window
cy.get("#flash-messages").trigger("mouseover");
// Mouse out of the window
cy.get("#flash-messages").trigger("mouseleave");
// This passes because the modal appears
cy.get(".modal");
});
});

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions