@nx/cypress 18.2.0-beta.1 → 18.2.0-beta.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "18.2.0-beta.
|
|
3
|
+
"version": "18.2.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.",
|
|
6
6
|
"repository": {
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"migrations": "./migrations.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nx/devkit": "18.2.0-beta.
|
|
38
|
-
"@nx/eslint": "18.2.0-beta.
|
|
39
|
-
"@nx/js": "18.2.0-beta.
|
|
37
|
+
"@nx/devkit": "18.2.0-beta.3",
|
|
38
|
+
"@nx/eslint": "18.2.0-beta.3",
|
|
39
|
+
"@nx/js": "18.2.0-beta.3",
|
|
40
40
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
41
41
|
"detect-port": "^1.5.1",
|
|
42
42
|
"semver": "^7.5.3",
|
|
43
43
|
"tslib": "^2.3.0",
|
|
44
|
-
"@nrwl/cypress": "18.2.0-beta.
|
|
44
|
+
"@nrwl/cypress": "18.2.0-beta.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"cypress": ">= 3 < 14"
|
package/src/plugins/plugin.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CreateDependencies, CreateNodes } from '@nx/devkit';
|
|
|
2
2
|
export interface CypressPluginOptions {
|
|
3
3
|
ciTargetName?: string;
|
|
4
4
|
targetName?: string;
|
|
5
|
+
openTargetName?: string;
|
|
5
6
|
componentTestingTargetName?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare const createDependencies: CreateDependencies;
|
package/src/plugins/plugin.js
CHANGED
|
@@ -144,8 +144,9 @@ async function buildCypressTargets(configFilePath, projectRoot, options, context
|
|
|
144
144
|
const dependsOn = [];
|
|
145
145
|
const outputs = getOutputs(projectRoot, cypressConfig, 'e2e');
|
|
146
146
|
const inputs = getInputs(namedInputs);
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
const groupName = 'E2E (CI)';
|
|
148
|
+
targetGroups = { [groupName]: [] };
|
|
149
|
+
const ciTargetGroup = targetGroups[groupName];
|
|
149
150
|
for (const file of specFiles) {
|
|
150
151
|
const relativeSpecFilePath = (0, devkit_1.normalizePath)((0, path_1.relative)(projectRoot, file));
|
|
151
152
|
const targetName = options.ciTargetName + '--' + relativeSpecFilePath;
|
|
@@ -188,11 +189,16 @@ async function buildCypressTargets(configFilePath, projectRoot, options, context
|
|
|
188
189
|
outputs: getOutputs(projectRoot, cypressConfig, 'component'),
|
|
189
190
|
};
|
|
190
191
|
}
|
|
192
|
+
targets[options.openTargetName] = {
|
|
193
|
+
command: `cypress open`,
|
|
194
|
+
options: { cwd: projectRoot },
|
|
195
|
+
};
|
|
191
196
|
return { targets, targetGroups };
|
|
192
197
|
}
|
|
193
198
|
function normalizeOptions(options) {
|
|
194
199
|
options ??= {};
|
|
195
200
|
options.targetName ??= 'e2e';
|
|
201
|
+
options.openTargetName ??= 'open-cypress';
|
|
196
202
|
options.componentTestingTargetName ??= 'component-test';
|
|
197
203
|
options.ciTargetName ??= 'e2e-ci';
|
|
198
204
|
return options;
|