Skip to content

Commit 86c205b

Browse files
committed
Merge branch 'master' into develop
2 parents 8c1c60f + a68e3be commit 86c205b

38 files changed

+310
-146
lines changed

circle.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,14 +1642,14 @@ jobs:
16421642
yarn workspace @cypress/schematic build:all
16431643
working_directory: npm/cypress-schematic
16441644
- run:
1645-
name: Launch
1645+
name: Run unit tests
16461646
command: |
1647-
yarn launch:test
1647+
yarn test
16481648
working_directory: npm/cypress-schematic
16491649
- run:
1650-
name: Run unit tests
1650+
name: Launch Sandbox and Install Schematic
16511651
command: |
1652-
yarn test
1652+
yarn launch:test12
16531653
working_directory: npm/cypress-schematic
16541654
- store-npm-logs
16551655

npm/cypress-schematic/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/schematic-v1.7.0](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.6.0...@cypress/schematic-v1.7.0) (2022-05-11)
2+
3+
4+
### Features
5+
6+
* **cypress/schematic:** add headed option and other fixes ([#21415](https://github.com/cypress-io/cypress/issues/21415)) ([8de7594](https://github.com/cypress-io/cypress/commit/8de7594446e398048a3693066f043d2d7be903f6))
7+
18
# [@cypress/schematic-v1.6.0](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.3...@cypress/schematic-v1.6.0) (2021-11-10)
29

310

npm/cypress-schematic/README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</a>
1010
</p>
1111

12-
Add this schematic to quickly get up and running with [Cypress](https://cypress.io) in your Angular project.
12+
Add this schematic to quickly get up and running with [Cypress](https://cypress.io) in your Angular project.
1313

1414
___
1515

@@ -27,13 +27,18 @@
2727

2828
✅ Optional: prompt you to add or update the default `ng e2e` command to use Cypress.
2929

30+
## Requirements
31+
32+
- Angular 12+
33+
3034
## Usage ⏯
3135

3236
Install the schematic:
3337

3438
```shell
3539
ng add @cypress/schematic
3640
```
41+
3742
To run Cypress in `open` mode within your project:
3843

3944
```shell script
@@ -171,6 +176,40 @@ You may want to specify a custom reporter. Cypress works with any reporters buil
171176

172177
Read our docs to learn more about working with [reporters](https://on.cypress.io/reporters).
173178

179+
### Running the builder with a different baseUrl
180+
181+
You can specify a `baseUrl` that is different than the one in `cypress.json`. To do this, add `baseUrl` to `configurations` like the following:
182+
183+
```json
184+
"cypress-open": {
185+
"builder": "@cypress/schematic:cypress",
186+
"options": {
187+
"devServerTarget": "{project-name}:serve",
188+
"watch": true,
189+
"headless": false
190+
},
191+
"configurations": {
192+
"production": {
193+
"devServerTarget": "{project-name}:serve:production"
194+
},
195+
"local-dev": {
196+
"devServerTarget": "{project-name}:serve:development",
197+
"baseUrl": "http://localhost:4002"
198+
},
199+
"another-env": {
200+
"devServerTarget": "{project-name}:serve:development",
201+
"baseUrl": "http://localhost:4004"
202+
}
203+
}
204+
}
205+
```
206+
207+
In order to prevent the application from building, add the following to the end of your command:
208+
209+
```shell
210+
--dev-server-target=''
211+
```
212+
174213
## Generator Options
175214

176215
### Specify Filename (bypassing CLI prompt)

npm/cypress-schematic/package.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@
99
"build:test": "tsc -p tsconfig.spec.json",
1010
"build:all": "tsc -p tsconfig.json && tsc -p tsconfig.spec.json",
1111
"build:watch": "tsc -p tsconfig.json --watch",
12-
"clean": "git checkout HEAD -- sandbox && git clean -f -d sandbox",
13-
"launch": "yarn link:sandbox && cd sandbox && ng add @cypress/schematic && cd ..",
14-
"launch:test": "yarn link:sandbox && cd sandbox && ng add @cypress/schematic --e2eUpdate=true && cd ..",
15-
"link:sandbox": "yarn link && cd sandbox && yarn link @cypress/schematic",
12+
"clean12": "git checkout HEAD -- sandbox12 && git clean -f -d sandbox12",
13+
"launch12": "yarn link:sandbox12 && cd sandbox12 && ng add @cypress/schematic && cd ..",
14+
"launch:test12": "yarn link:sandbox12 && cd sandbox12 && ng add @cypress/schematic --e2eUpdate=true && cd ..",
15+
"link:sandbox12": "yarn link && cd sandbox12 && yarn link @cypress/schematic",
1616
"test": "mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json src/**/*.spec.ts",
17-
"test:e2e:sandbox": "cd sandbox && ng run sandbox:cypress-run",
18-
"unlink:sandbox": "cd sandbox && yarn unlink @cypress/schematic && cd .. && yarn unlink"
17+
"test:e2e:sandbox12": "cd sandbox12 && ng run sandbox:cypress-run",
18+
"unlink:sandbox12": "cd sandbox12 && yarn unlink @cypress/schematic && cd .. && yarn unlink"
1919
},
2020
"dependencies": {
2121
"@angular-devkit/architect": "^0.1202.10",
22-
"@angular-devkit/core": "^12.2.10",
23-
"@angular-devkit/schematics": "^12.2.10",
24-
"@schematics/angular": "^12.2.10",
22+
"@angular-devkit/core": "^12.2.17",
23+
"@angular-devkit/schematics": "^12.2.17",
24+
"@schematics/angular": "^12.2.17",
2525
"jsonc-parser": "^3.0.0",
2626
"rxjs": "~6.6.0"
2727
},
2828
"devDependencies": {
29-
"@angular-devkit/schematics-cli": "^12.2.10",
30-
"@angular/cli": "^12",
29+
"@angular-devkit/schematics-cli": "^12.2.17",
30+
"@angular/cli": "^12.2.17",
3131
"@types/chai-enzyme": "0.6.7",
3232
"@types/mocha": "8.0.3",
3333
"@types/node": "^12.11.1",
@@ -36,6 +36,10 @@
3636
"mocha": "3.5.3",
3737
"typescript": "~4.2.4"
3838
},
39+
"peerDependencies": {
40+
"@angular/cli": ">=12",
41+
"@angular/core": ">=12"
42+
},
3943
"license": "MIT",
4044
"repository": {
4145
"type": "git",
@@ -48,7 +52,9 @@
4852
"schematics",
4953
"cypress",
5054
"e2e",
51-
"testing"
55+
"testing",
56+
"angular",
57+
"automation"
5258
],
5359
"publishConfig": {
5460
"access": "public"
@@ -58,4 +64,4 @@
5864
"save": "devDependencies"
5965
},
6066
"schematics": "./src/schematics/collection.json"
61-
}
67+
}
File renamed without changes.

0 commit comments

Comments
 (0)