Skip to content

Commit

Permalink
try click using cypress-real-events plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
braddf committed Jan 9, 2025
1 parent 3d18f5c commit 18d0028
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/nowcasting-app/cypress/e2e/pvLatest.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "cypress-real-events/support";

describe("Load the page", () => {
beforeEach(function () {
// cy.visit("http://localhost:3002/");
Expand Down Expand Up @@ -40,7 +42,7 @@ describe("Load the page", () => {
// Profile dropdown menu
cy.get("header #UserMenu-4hViewBtn").should("not.exist");
cy.get("header button").contains("Open user menu").should("exist");
cy.get("header button").contains("Open user menu").parent().click();
cy.get("header button").contains("Open user menu").parent().realClick();
cy.get("header #UserMenu-NhViewBtn").should("exist");
cy.get("header #UserMenu-NhViewBtn").should("be.visible");
cy.get("header #UserMenu-NhViewBtn").should("contain", "N-hour forecast");
Expand Down
1 change: 1 addition & 0 deletions apps/nowcasting-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@types/cookies": "^0.7.7",
"axios": "^0.27.2",
"cookies": "^0.8.0",
"cypress-real-events": "^1.13.0",
"js-cookie": "^3.0.5",
"mapbox-gl": "^3.8.0",
"next": "14.1.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6762,6 +6762,11 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==

cypress-real-events@^1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.13.0.tgz#6b7cd32dcac172db1493608f97a2576c7d0bd5af"
integrity sha512-LoejtK+dyZ1jaT8wGT5oASTPfsNV8/ClRp99ruN60oPj8cBJYod80iJDyNwfPAu4GCxTXOhhAv9FO65Hpwt6Hg==

cypress@^13.6.4:
version "13.8.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.8.0.tgz#118e94161334e03841714c9b9b3600ae853c11f9"
Expand Down

0 comments on commit 18d0028

Please sign in to comment.