@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.1",
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.1",
38
- "@nx/eslint": "18.2.0-beta.1",
39
- "@nx/js": "18.2.0-beta.1",
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.1"
44
+ "@nrwl/cypress": "18.2.0-beta.3"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "cypress": ">= 3 < 14"
@@ -45,6 +45,8 @@ function addPlugin(tree) {
45
45
  options: {
46
46
  targetName: 'e2e',
47
47
  componentTestingTargetName: 'component-test',
48
+ ciTargetName: 'e2e-ci',
49
+ openTargetName: 'open-cypress',
48
50
  },
49
51
  });
50
52
  (0, devkit_1.updateNxJson)(tree, nxJson);
@@ -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;
@@ -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
- targetGroups = { [options.ciTargetName]: [] };
148
- const ciTargetGroup = targetGroups[options.ciTargetName];
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;