Skip to content

Commit 87af770

Browse files
authored
Upgrade Cypress along with the agent (#96)
* Upgrade Cypress along with the agent * Specify the agent version which was released today
1 parent 0063d53 commit 87af770

File tree

8 files changed

+2065
-164
lines changed

8 files changed

+2065
-164
lines changed

agent-cypress/cypress.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { defineConfig } from "cypress";
2+
import { addVisualRegressionTrackerPlugin } from "@visual-regression-tracker/agent-cypress";
3+
4+
/**
5+
* @see https://docs.cypress.io/guides/references/configuration
6+
*/
7+
export default defineConfig({
8+
e2e: {
9+
baseUrl: "https://www.google.com/",
10+
specPattern: "cypress/integration/*.spec.js",
11+
12+
setupNodeEvents(on, config) {
13+
// `on` is used to hook into various events Cypress emits
14+
// `config` is the resolved Cypress config
15+
addVisualRegressionTrackerPlugin(on, config);
16+
},
17+
},
18+
video: false,
19+
screenshotOnRunFailure: false,
20+
retries: {
21+
runMode: 1,
22+
openMode: 0,
23+
},
24+
env: {
25+
visualRegressionTracker: {
26+
apiUrl: "http://localhost:4200",
27+
apiKey: "DEFAULTUSERAPIKEYTOBECHANGED",
28+
project: "Default project",
29+
branchName: "master",
30+
enableSoftAssert: true,
31+
},
32+
},
33+
});

agent-cypress/cypress.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

agent-cypress/cypress/plugins/index.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

agent-cypress/cypress/support/commands.js renamed to agent-cypress/cypress/support/e2e.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,7 @@
2424
// -- This will overwrite an existing command --
2525
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
2626
import {
27-
addVrtStartCommand,
28-
addVrtTrackCommand,
29-
addVrtStopCommand,
30-
addVrtTrackBufferCommand,
31-
addVrtTrackBase64Command,
32-
} from "@visual-regression-tracker/agent-cypress/dist/commands";
27+
addVrtCommands,
28+
} from "@visual-regression-tracker/agent-cypress";
3329

34-
addVrtStartCommand();
35-
addVrtTrackCommand();
36-
addVrtStopCommand();
37-
addVrtTrackBufferCommand();
38-
addVrtTrackBase64Command();
30+
addVrtCommands();

agent-cypress/cypress/support/index.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)