Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dpiatek committed Dec 14, 2023
1 parent 2d8a4f0 commit ff798da
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cypress/e2e/core/meganav/behaviour.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ describe("Opening panels on desktop", () => {
* likely needs a more complex rewrite as per https://docs.cypress.io/api/commands/hover#Workarounds
* note that by default cypress does not have it.skip
*/

// it("opens the correct panel when a control is hovered over and closes it on leave", () => {
// cy.get(PLATFORM_PANEL).should("not.be.visible");

// cy.get(PLATFORM_PANEL_OPEN_CONTROL).trigger("mouseenter");
// cy.get(PLATFORM_PANEL).should("be.visible");
it("opens the correct panel when a control is hovered over and closes it on leave", () => {
cy.get(PLATFORM_PANEL).should("not.be.visible");

cy.get(PLATFORM_PANEL_OPEN_CONTROL).realHover()
cy.get(PLATFORM_PANEL).should("be.visible");

// cy.get(PLATFORM_PANEL_OPEN_CONTROL).trigger("mouseleave");
// cy.get(PLATFORM_PANEL).should("not.be.visible");
// });
cy.get(PLATFORM_PANEL_OPEN_CONTROL).trigger("mouseleave");
cy.get(PLATFORM_PANEL).should("not.be.visible");
});

it("opens the correct panel when a control is clicked", () => {
cy.get(PLATFORM_PANEL).should("not.be.visible");
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import "cypress-real-events";

export { fixSnapshotSpec } from "./e2e";
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@mrtkrcm/cypress-plugin-snapshots": "https://github.com/mrtkrcm/cypress-plugin-snapshots#v1.13.0",
"addsearch-js-client": "^0.7.0",
"array-flat-polyfill": "^1.0.1",
"cypress-real-events": "^1.11.0",
"dompurify": "^2.2.9",
"highlight.js": "^10.7.2",
"highlightjs-curl": "^1.3.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,11 @@ csso@^4.0.2:
dependencies:
css-tree "^1.1.2"

cypress-real-events@^1.11.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.11.0.tgz#292fe5281c5b6e955524e766ab7fec46930c7763"
integrity sha512-4LXVRsyq+xBh5TmlEyO1ojtBXtN7xw720Pwb9rEE9rkJuXmeH3VyoR1GGayMGr+Itqf11eEjfDewtDmcx6PWPQ==

cypress@^13.3.1:
version "13.3.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.3.1.tgz#d72f922e167891574c7773d07ac64d7114e11d49"
Expand Down

0 comments on commit ff798da

Please sign in to comment.