@argos-ci/cypress 1.2.2 → 1.3.0
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/dist/support.mjs +1 -1
- package/dist/task.cjs +23 -0
- package/dist/task.d.ts +10 -0
- package/dist/task.mjs +21 -0
- package/package.json +15 -9
package/dist/support.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { resolveViewport } from '@argos-ci/browser';
|
|
|
3
3
|
import { getGlobalFilePath } from '@argos-ci/browser/cypress.cjs';
|
|
4
4
|
import { getScreenshotName, getMetadataPath } from '@argos-ci/util/browser';
|
|
5
5
|
|
|
6
|
-
var version = "1.2.
|
|
6
|
+
var version = "1.2.2";
|
|
7
7
|
|
|
8
8
|
function injectArgos() {
|
|
9
9
|
cy.window({
|
package/dist/task.cjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@argos-ci/core');
|
|
4
|
+
|
|
5
|
+
/// <reference types="cypress" />
|
|
6
|
+
function registerArgosTask(on, config, options) {
|
|
7
|
+
on("after:run", async ()=>{
|
|
8
|
+
const { screenshotsFolder } = config;
|
|
9
|
+
if (!screenshotsFolder) return;
|
|
10
|
+
const { uploadToArgos = true } = options || {};
|
|
11
|
+
if (!uploadToArgos) return;
|
|
12
|
+
const res = await core.upload({
|
|
13
|
+
files: [
|
|
14
|
+
"**/*.png"
|
|
15
|
+
],
|
|
16
|
+
root: screenshotsFolder,
|
|
17
|
+
...options
|
|
18
|
+
});
|
|
19
|
+
console.log(`✅ Argos build created: ${res.build.url}`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.registerArgosTask = registerArgosTask;
|
package/dist/task.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UploadParameters } from "@argos-ci/core";
|
|
2
|
+
type RegisterArgosTaskOptions = Omit<UploadParameters, "files" | "root"> & {
|
|
3
|
+
/**
|
|
4
|
+
* Upload the report to Argos.
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
uploadToArgos?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare function registerArgosTask(on: Cypress.PluginEvents, config: Cypress.Config, options?: RegisterArgosTaskOptions): void;
|
|
10
|
+
export { RegisterArgosTaskOptions, registerArgosTask };
|
package/dist/task.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { upload } from '@argos-ci/core';
|
|
2
|
+
|
|
3
|
+
/// <reference types="cypress" />
|
|
4
|
+
function registerArgosTask(on, config, options) {
|
|
5
|
+
on("after:run", async ()=>{
|
|
6
|
+
const { screenshotsFolder } = config;
|
|
7
|
+
if (!screenshotsFolder) return;
|
|
8
|
+
const { uploadToArgos = true } = options || {};
|
|
9
|
+
if (!uploadToArgos) return;
|
|
10
|
+
const res = await upload({
|
|
11
|
+
files: [
|
|
12
|
+
"**/*.png"
|
|
13
|
+
],
|
|
14
|
+
root: screenshotsFolder,
|
|
15
|
+
...options
|
|
16
|
+
});
|
|
17
|
+
console.log(`✅ Argos build created: ${res.build.url}`);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { registerArgosTask };
|
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": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -23,28 +23,35 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
26
27
|
"exports": {
|
|
27
28
|
"./support": {
|
|
28
|
-
"import": "./dist/support.mjs",
|
|
29
29
|
"types": "./dist/support.d.ts",
|
|
30
|
+
"import": "./dist/support.mjs",
|
|
30
31
|
"default": "./dist/support.mjs"
|
|
31
32
|
},
|
|
33
|
+
"./task": {
|
|
34
|
+
"types": "./dist/task.d.ts",
|
|
35
|
+
"import": "./dist/task.mjs",
|
|
36
|
+
"require": "./dist/task.cjs",
|
|
37
|
+
"default": "./dist/task.cjs"
|
|
38
|
+
},
|
|
32
39
|
"./package.json": "./package.json"
|
|
33
40
|
},
|
|
34
|
-
"types": "./dist/support.d.ts",
|
|
35
41
|
"engines": {
|
|
36
42
|
"node": ">=16.0.0"
|
|
37
43
|
},
|
|
38
44
|
"dependencies": {
|
|
39
|
-
"@argos-ci/browser": "1.
|
|
40
|
-
"@argos-ci/
|
|
45
|
+
"@argos-ci/browser": "1.3.0",
|
|
46
|
+
"@argos-ci/core": "1.4.0",
|
|
47
|
+
"@argos-ci/util": "1.2.0",
|
|
41
48
|
"cypress-wait-until": "^1.7.2"
|
|
42
49
|
},
|
|
43
50
|
"peerDependencies": {
|
|
44
51
|
"cypress": "^12.0.0 || ^13.0.0"
|
|
45
52
|
},
|
|
46
53
|
"devDependencies": {
|
|
47
|
-
"@argos-ci/cli": "1.0.
|
|
54
|
+
"@argos-ci/cli": "1.0.5",
|
|
48
55
|
"@argos-ci/cypress": "workspace:.",
|
|
49
56
|
"@types/node": "^16.0.0",
|
|
50
57
|
"cypress": "^13.3.0",
|
|
@@ -55,8 +62,7 @@
|
|
|
55
62
|
"prebuild": "rm -rf dist",
|
|
56
63
|
"build": "rollup -c",
|
|
57
64
|
"test": "pnpm exec cypress run",
|
|
58
|
-
"
|
|
59
|
-
"e2e": "pnpm run test && pnpm run argos-upload"
|
|
65
|
+
"e2e": "UPLOAD_TO_ARGOS=true pnpm run test"
|
|
60
66
|
},
|
|
61
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "ac02d37ca89f73359fba70cfe9b579396c3260d8"
|
|
62
68
|
}
|