@argos-ci/cypress 7.0.15 → 7.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  <p align="center">
2
2
  <a href="https://argos-ci.com/?utm_source=github&utm_medium=logo" target="_blank">
3
- <img src="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/logo-github-readme.png" alt="Argos" width="300" height="61">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-dark.png">
5
+ <img alt="Argos" src="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-light.png" width="360" height="70">
6
+ </picture>
4
7
  </a>
5
8
  </p>
6
9
 
7
- _Argos is a visual testing solution that fits in your workflow to avoid visual regression. Takes screenshots on each commit and be notified if something changes._
10
+ <p align="center"><strong>The open source visual testing platform for AI-native engineering teams.</strong></p>
8
11
 
9
12
  # Official Argos Cypress integration
10
13
 
@@ -12,9 +15,60 @@ _Argos is a visual testing solution that fits in your workflow to avoid visual r
12
15
  [![npm dm](https://img.shields.io/npm/dm/@argos-ci/cypress.svg)](https://www.npmjs.com/package/@argos-ci/cypress)
13
16
  [![npm dt](https://img.shields.io/npm/dt/@argos-ci/cypress.svg)](https://www.npmjs.com/package/@argos-ci/cypress)
14
17
 
15
- Visit [argos-ci.com/docs/cypress](https://argos-ci.com/docs/cypress) for guides, API and more.
18
+ Capture stable Argos screenshots from your [Cypress](https://www.cypress.io/) tests.
19
+
20
+ Visit the [Cypress SDK documentation](https://argos-ci.com/docs/sdks-reference/cypress) for guides, the API reference, and more.
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ npm install --save-dev @argos-ci/cypress
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ Register the Argos task in your Cypress config:
31
+
32
+ ```ts
33
+ // cypress.config.js
34
+ const { defineConfig } = require("cypress");
35
+ const { registerArgosTask } = require("@argos-ci/cypress/task");
36
+
37
+ module.exports = defineConfig({
38
+ e2e: {
39
+ setupNodeEvents(on, config) {
40
+ registerArgosTask(on, config, {
41
+ // Upload the screenshots to Argos only on CI.
42
+ uploadToArgos: !!process.env.CI,
43
+ });
44
+
45
+ return config;
46
+ },
47
+ },
48
+ });
49
+ ```
50
+
51
+ Import the command in your support file:
52
+
53
+ ```ts
54
+ // cypress/support/e2e.js
55
+ import "@argos-ci/cypress/support";
56
+ ```
57
+
58
+ Then capture stable screenshots with `cy.argosScreenshot` in your tests:
59
+
60
+ ```ts
61
+ // cypress/e2e/example.cy.js
62
+ describe("Homepage", () => {
63
+ it("takes a screenshot", () => {
64
+ cy.visit("http://localhost:3000");
65
+ cy.argosScreenshot("homepage");
66
+ });
67
+ });
68
+ ```
16
69
 
17
70
  ## Links
18
71
 
19
- - [Official SDK Docs](https://argos-ci.com/docs)
72
+ - [Official SDK Docs](https://argos-ci.com/docs/sdks-reference/cypress)
73
+ - [Quickstart](https://argos-ci.com/docs/quickstart/cypress-quickstart)
20
74
  - [Discord](https://argos-ci.com/discord)
@@ -34,7 +34,7 @@ declare global {
34
34
  /**
35
35
  * Stabilize the UI and takes a screenshot of the application under test.
36
36
  *
37
- * @see https://argos-ci.com/docs/cypress#api-overview
37
+ * @see https://argos-ci.com/docs/sdks-reference/cypress
38
38
  * @example
39
39
  * cy.argosScreenshot("my-screenshot")
40
40
  * cy.get(".post").argosScreenshot()
package/dist/support.mjs CHANGED
@@ -2,7 +2,7 @@ import "cypress-wait-until";
2
2
  import { getGlobalScript, resolveViewport } from "@argos-ci/browser";
3
3
  import { getMetadataPath, getScreenshotName, validateThreshold } from "@argos-ci/util/browser";
4
4
  //#region package.json
5
- var version = "7.0.14";
5
+ var version = "7.0.15";
6
6
  //#endregion
7
7
  //#region src/shared.ts
8
8
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/cypress",
3
3
  "description": "Cypress SDK for visual testing with Argos.",
4
- "version": "7.0.15",
4
+ "version": "7.0.16",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/argos-ci/argos-javascript.git",
10
10
  "directory": "packages/cypress"
11
11
  },
12
- "homepage": "https://argos-ci.com/docs/cypress",
12
+ "homepage": "https://argos-ci.com/docs/sdks-reference/cypress",
13
13
  "bugs": {
14
14
  "url": "https://github.com/argos-ci/argos-javascript/issues"
15
15
  },
@@ -44,9 +44,9 @@
44
44
  "node": ">=22.0.0"
45
45
  },
46
46
  "dependencies": {
47
- "@argos-ci/browser": "6.4.0",
48
- "@argos-ci/core": "6.4.0",
49
- "@argos-ci/util": "4.0.0",
47
+ "@argos-ci/browser": "6.4.1",
48
+ "@argos-ci/core": "6.5.0",
49
+ "@argos-ci/util": "4.0.1",
50
50
  "cypress-wait-until": "^3.0.2"
51
51
  },
52
52
  "peerDependencies": {
@@ -66,5 +66,5 @@
66
66
  "check-format": "prettier --check --ignore-unknown --ignore-path=../../.gitignore --ignore-path=../../.prettierignore .",
67
67
  "lint": "eslint ."
68
68
  },
69
- "gitHead": "7db853496fdaad253d005fb30c4b47269972b7b0"
69
+ "gitHead": "7fddaad1a6bb251a1f2eecbf8f4ecfa3e84e9b97"
70
70
  }