Skip to content

Commit

Permalink
cypress colocation + upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
binrysearch committed Jun 30, 2024
1 parent 137b481 commit b26e4eb
Show file tree
Hide file tree
Showing 68 changed files with 226 additions and 104 deletions.
2 changes: 2 additions & 0 deletions tests/cypress.config.js → cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module.exports = defineConfig({
env: {
failSilently: false,
},
supportFile: "./cypress/support/index.ts",
e2e: {
specPattern: "**/*.*cy.*",
setupNodeEvents(on, config) {
getCompareSnapshotsPlugin(on, config);
},
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions cypress/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = (on, config) => {
const getCompareSnapshotsPlugin = require("cypress-visual-regression/dist/plugin");
getCompareSnapshotsPlugin(on, config);
};
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions cypress/support/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

declare namespace Cypress {
interface Chainable<Subject = any>{
nextStep(): Chainable<any>;
prevStep(): Chainable<any>;
}
interface Window {
introJs: any;
}
}
24 changes: 24 additions & 0 deletions cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/// <reference types="./index.d.ts" />

import compareSnapshotCommand from "cypress-visual-regression/dist/command";

compareSnapshotCommand({
capture: "fullPage",
});

Cypress.Commands.add("nextStep", () => {
cy.get(".introjs-nextbutton").click();
});

Cypress.Commands.add("prevStep", () => {
cy.get(".introjs-prevbutton").click();
});

Cypress.on("window:before:load", (win) => {
const htmlNode = win.document.querySelector("html");
const node = win.document.createElement("style");
node.innerHTML = "html { scroll-behavior: inherit !important; }";
htmlNode?.appendChild(node);
});

import "cypress-real-events/support";
Binary file added cypress/videos/hint/hideHints.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/hint/modal.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/hint/removeHints.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/hint/showHints.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/tour/dont-show-again.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/tour/exit.cy.js.mp4
Binary file not shown.
Loading

0 comments on commit b26e4eb

Please sign in to comment.