@argos-ci/cypress 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/support.js +4 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/cypress",
3
3
  "description": "Visual testing solution to avoid visual regression. Cypress commands and utilities for Argos visual testing.",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": "github:argos-ci/argos-cypress",
@@ -19,11 +19,9 @@
19
19
  "access": "public"
20
20
  },
21
21
  "type": "module",
22
- "main": "./support.js",
23
- "types": "./support.d.ts",
24
22
  "exports": {
25
23
  "./support": {
26
- "require": "./support.js",
24
+ "import": "./support.js",
27
25
  "types": "./support.d.ts",
28
26
  "default": "./support.js"
29
27
  },
@@ -32,7 +30,7 @@
32
30
  "scripts": {
33
31
  "test": "cypress run",
34
32
  "test:open": "cypress open --e2e -b chrome",
35
- "format": "prettier --write \"**/*.{js,md,json}\" ",
33
+ "format": "prettier --write .",
36
34
  "lint": "eslint --ignore-path .gitignore .",
37
35
  "release": "standard-version && conventional-github-releaser --preset angular"
38
36
  },
@@ -40,6 +38,8 @@
40
38
  "cypress-wait-until": "^1.7.2"
41
39
  },
42
40
  "devDependencies": {
41
+ "@argos-ci/cli": "^0.1.2",
42
+ "@argos-ci/cypress": "file:.",
43
43
  "conventional-github-releaser": "^3.1.5",
44
44
  "cypress": "^10.6.0",
45
45
  "eslint": "^8.23.0",
package/support.js CHANGED
@@ -66,7 +66,7 @@ Cypress.Commands.add(
66
66
  name = null;
67
67
  }
68
68
 
69
- const screenshotName = `argos/${name ?? cy.state("runnable").fullTitle()}`;
69
+ const screenshotName = `argos/${name || cy.state("runnable").fullTitle()}`;
70
70
  Cypress.log({
71
71
  name: "argosScreenshot",
72
72
  displayName: `Argos Screenshot`,
@@ -81,9 +81,9 @@ Cypress.Commands.add(
81
81
 
82
82
  // Screenshot
83
83
  cy.wrap(subject).screenshot(screenshotName, {
84
- capture: "viewport",
85
- overwrite: true,
86
- blackout: ['[data-visual-test="blackout"]', ...(options.blackout ?? [])],
84
+ blackout: ['[data-visual-test="blackout"]'].concat(
85
+ options.blackout || []
86
+ ),
87
87
  ...options,
88
88
  });
89
89
  }