Skip to content

Commit 20d66a8

Browse files
committed
Merge branch 'develop' into 10.0-release
* develop: test: node_modules installs for system-tests, other improvements (#18574) chore(deps): update dependency semantic-release to v17.2.3 [security] (#19022) chore: remove flaky ci jobs for main builds (#19071) chore(contributing): clarify PULL_REQUEST_TEMPLATE (#19068) fix: the shadow root container element is ignored when clicking an element in it. (#18908) 'Fix' flaky redirect test (#19042) release 9.1.0 [skip ci] fix: Allow 'this' to be used in overridden commands (#18899) fix(react): link to rerender example (#19020) chore(deps): update dependency aws-sdk to v2.814.0 [security] (#18948) fix: test config overrides leak for .only execution (#18961) feat: Set CYPRESS=true as env var in child processes where Cypress runs user code in Node (#18981) fix: Restore broken gif (#18987) chore: release @cypress/vite-dev-server-v2.2.1
2 parents a4bec4a + 71d92e0 commit 20d66a8

File tree

91 files changed

+7448
-1969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+7448
-1969
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
- Closes <!-- link to the issue here, if there is one -->
99

1010
### User facing changelog
11-
<!-- Explain the change(s) for every user to read in our changelog. Examples: https://on.cypress.io/changelog -->
11+
<!--
12+
Explain the change(s) for every user to read in our changelog. Examples: https://on.cypress.io/changelog
13+
If the change is not user-facing, write "n/a".
14+
-->
1215

1316
### Additional details
1417
<!-- Examples:
@@ -22,11 +25,14 @@
2225
Screenshots or GIFs are preferred. -->
2326

2427
### PR Tasks
25-
<!-- These tasks must be completed before a PR is merged.
26-
Delete tasks if they are not applicable. -->
28+
<!--
29+
These tasks must be completed before a PR is merged.
30+
If a task does not apply, write [na] instead of checking the box.
31+
DO NOT DELETE the PR checklist.
32+
-->
2733

2834
- [ ] Have tests been added/updated?
29-
- [ ] Has the original issue or this PR been tagged with a release in ZenHub? <!-- (internal team only)-->
35+
- [ ] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
3036
- [ ] Has a PR for user-facing changes been opened in [`cypress-documentation`](https://github.com/cypress-io/cypress-documentation)? <!-- Link to PR here -->
3137
- [ ] Have API changes been updated in the [`type definitions`](https://github.com/cypress-io/cypress/blob/develop/cli/types/cypress.d.ts)?
3238
- [ ] Have new configuration options been added to the [`cypress.schema.json`](https://github.com/cypress-io/cypress/blob/develop/cli/schema/cypress.schema.json)?

circle.yml

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,55 @@ commands:
155155
name: Restore all node_modules to proper workspace folders
156156
command: node scripts/circle-cache.js --action unpack
157157

158+
restore_cached_system_tests_deps:
159+
description: 'Restore the cached node_modules for projects in "system-tests/projects/**"'
160+
steps:
161+
- run:
162+
name: Generate Circle Cache key for system tests
163+
command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key
164+
- restore_cache:
165+
name: Restore system tests node_modules cache
166+
keys:
167+
- v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-{{ checksum "system_tests_cache_key" }}
168+
- v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-
169+
170+
update_cached_system_tests_deps:
171+
description: 'Update the cached node_modules for projects in "system-tests/projects/**"'
172+
steps:
173+
- run:
174+
name: Generate Circle Cache key for system tests
175+
command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key
176+
- restore_cache:
177+
name: Restore cache state, to check for known modules cache existence
178+
keys:
179+
- v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-state-{{ checksum "system_tests_cache_key" }}
180+
- run:
181+
name: Bail if specific cache exists
182+
command: |
183+
if [[ -f "system_tests_node_modules_installed" ]]; then
184+
echo "No updates to system tests node modules, exiting"
185+
circleci-agent step halt
186+
fi
187+
- restore_cache:
188+
name: Restore system tests node_modules cache
189+
keys:
190+
- v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-{{ checksum "system_tests_cache_key" }}
191+
- v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-
192+
- run:
193+
name: Update system-tests node_modules cache
194+
command: yarn workspace @tooling/system-tests projects:yarn:install
195+
- save_cache:
196+
name: Save system tests node_modules cache
197+
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-{{ checksum "system_tests_cache_key" }}
198+
paths:
199+
- ~/.cache/cy-system-tests-node-modules
200+
- run: touch system_tests_node_modules_installed
201+
- save_cache:
202+
name: Save system tests node_modules cache state key
203+
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-system-tests-projects-node-modules-cache-state-{{ checksum "system_tests_cache_key" }}
204+
paths:
205+
- system_tests_node_modules_installed
206+
158207
caching-dependency-installer:
159208
description: 'Installs & caches the dependencies based on yarn lock & package json dependencies'
160209
parameters:
@@ -468,6 +517,7 @@ commands:
468517
type: string
469518
steps:
470519
- restore_cached_workspace
520+
- restore_cached_system_tests_deps
471521
- run:
472522
name: Run system tests
473523
command: |
@@ -1156,6 +1206,12 @@ jobs:
11561206
path: /tmp/artifacts
11571207
- store-npm-logs
11581208

1209+
system-tests-node-modules-install:
1210+
<<: *defaults
1211+
steps:
1212+
- restore_cached_workspace
1213+
- update_cached_system_tests_deps
1214+
11591215
system-tests-chrome:
11601216
<<: *defaults
11611217
resource_class: medium
@@ -2039,17 +2095,6 @@ jobs:
20392095
repo: cypress-example-todomvc
20402096
browser: firefox
20412097

2042-
"test-binary-against-documentation-firefox":
2043-
<<: *defaults
2044-
resource_class: medium
2045-
steps:
2046-
- test-binary-against-repo:
2047-
repo: cypress-documentation
2048-
browser: firefox
2049-
command: "yarn cypress run"
2050-
wait-on: http://localhost:3000
2051-
server-start-command: yarn serve:dist
2052-
20532098
"test-binary-against-conduit-chrome":
20542099
<<: *defaults
20552100
resource_class: medium
@@ -2184,19 +2229,22 @@ linux-workflow: &linux-workflow
21842229
- server-performance-tests:
21852230
requires:
21862231
- build
2187-
- system-tests-chrome:
2232+
- system-tests-node-modules-install:
21882233
requires:
21892234
- build
2235+
- system-tests-chrome:
2236+
requires:
2237+
- system-tests-node-modules-install
21902238
- system-tests-electron:
21912239
requires:
2192-
- build
2240+
- system-tests-node-modules-install
21932241
- system-tests-firefox:
21942242
requires:
2195-
- build
2243+
- system-tests-node-modules-install
21962244
- system-tests-non-root:
21972245
executor: non-root-docker-user
21982246
requires:
2199-
- build
2247+
- system-tests-node-modules-install
22002248
- driver-integration-tests-chrome:
22012249
requires:
22022250
- build
@@ -2424,16 +2472,16 @@ linux-workflow: &linux-workflow
24242472

24252473
- test-binary-against-kitchensink-chrome:
24262474
<<: *onlyMainBranches
2427-
- test-binary-against-conduit-chrome:
2428-
<<: *onlyMainBranches
2475+
# Re-enable when the cypress-example-conduit-app project is fixed.
2476+
# https://github.com/cypress-io/cypress-example-conduit-app/issues/346
2477+
# - test-binary-against-conduit-chrome:
2478+
# <<: *onlyMainBranches
24292479
- test-binary-against-recipes-firefox:
24302480
<<: *onlyMainBranches
24312481
- test-binary-against-kitchensink-firefox:
24322482
<<: *onlyMainBranches
24332483
- test-binary-against-todomvc-firefox:
24342484
<<: *onlyMainBranches
2435-
- test-binary-against-documentation-firefox:
2436-
<<: *onlyMainBranches
24372485
- test-binary-against-api-testing-firefox:
24382486
<<: *onlyMainBranches
24392487
- test-binary-against-piechopper-firefox:

npm/create-cypress-tests/demo.gif

29.6 MB
Loading

npm/react/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Spec | Description
138138
[css modules](cypress/component/basic/css-modules) | Shows that component that using css modules styles works
139139
[network](cypress/component/basic/network) | Confirms we can use `cy.route` to stub / spy on component's network calls
140140
[no-visit](cypress/component/basic/no-visit) | Component specs cannot call `cy.visit`
141-
[re-render](cypress/component/basic/re-render) | Checking how the component re-renders when its props change
141+
[rerender](cypress/component/basic/rerender) | Checking how the component re-renders when its props change
142142
[react-book-by-chris-noring](cypress/component/basic/react-book-by-chris-noring) | Copied test examples from [React Book](https://softchris.github.io/books/react) and adapted for Cypress component tests
143143
[react-tutorial](cypress/component/basic/react-tutorial) | Tests from official [ReactJS tutorial](https://reactjs.org/tutorial/tutorial.html) copied and adapted for Cypress component tests
144144
[stub-example](cypress/component/basic/stub-example) | Uses `cy.stub` as component props

npm/vite-dev-server/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/vite-dev-server-v2.2.1](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v2.2.0...@cypress/vite-dev-server-v2.2.1) (2021-11-19)
2+
3+
4+
### Bug Fixes
5+
6+
* compile npm packages for node 12 ([#18989](https://github.com/cypress-io/cypress/issues/18989)) ([30b3eb2](https://github.com/cypress-io/cypress/commit/30b3eb2376bc1ed69087ba96f60448687e8489e6))
7+
18
# [@cypress/vite-dev-server-v2.2.0](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v2.1.1...@cypress/vite-dev-server-v2.2.0) (2021-10-15)
29

310

npm/webpack-preprocessor/lib/typescript-overrides.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ export const overrideSourceMaps = (sourceMap: boolean, typescriptPath?: string)
1717
return
1818
}
1919

20-
const typescript = require(typescriptPath || 'typescript') as typeof import('typescript')
20+
// when using webpack-preprocessor as a local filesystem dependency (`file:...`),
21+
// require(typescript) will resolve to this repo's `typescript` devDependency, not the
22+
// targeted project's `typescript`, which breaks monkeypatching. resolving from the
23+
// CWD avoids this issue.
24+
const projectTsPath = require.resolve(typescriptPath || 'typescript', {
25+
paths: [process.cwd()],
26+
})
27+
28+
const typescript = require(projectTsPath) as typeof import('typescript')
2129
const { createProgram } = typescript
2230

2331
debug('typescript found, overriding typescript.createProgram()')

npm/webpack-preprocessor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"react": "16.13.1",
5454
"react-dom": "16.13.1",
5555
"react-scripts": "3.2",
56-
"semantic-release": "17.0.4",
56+
"semantic-release": "17.2.3",
5757
"shx": "0.3.3",
5858
"sinon": "^9.0.0",
5959
"sinon-chai": "^3.5.0",

npm/webpack-preprocessor/test/unit/typescript-overrides.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('./lib/typescript-overrides', () => {
147147
const err = typescriptOverrides.overrideSourceMaps(true)
148148

149149
expect(err).to.be.instanceOf(Error)
150-
expect(err.message).to.eq(`Cannot find module 'typescript'`)
150+
expect(err.message).to.match(/Cannot find module '.*typescript\.js'/)
151151
})
152152
})
153153
})

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cypress",
3-
"version": "9.0.0",
3+
"version": "9.1.0",
44
"description": "Cypress.io end to end testing tool",
55
"private": true,
66
"scripts": {
@@ -48,7 +48,7 @@
4848
"npm-release": "node scripts/npm-release.js",
4949
"prestart": "yarn ensure-deps",
5050
"start": "cypress open --dev --global",
51-
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,src,__snapshots__ --exclude e2e.ts,cypress-tests.ts",
51+
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,src,__snapshots__ --exclude e2e.ts,cypress-tests.ts,*only_spec.js",
5252
"stop-only-all": "yarn stop-only --folder packages",
5353
"pretest": "yarn ensure-deps",
5454
"test": "yarn lerna exec yarn test --scope cypress --scope \"'@packages/{config,electron,extension,https-proxy,launcher,net-stubbing,network,proxy,rewriter,runner,runner-shared,socket}'\"",
@@ -127,7 +127,7 @@
127127
"arg": "4.1.2",
128128
"ascii-table": "0.0.9",
129129
"autobarrel": "^1.1.0",
130-
"aws-sdk": "2.447.0",
130+
"aws-sdk": "2.814.0",
131131
"babel-eslint": "10.1.0",
132132
"bluebird": "3.5.3",
133133
"bluebird-retry": "0.11.0",

packages/config/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = {
5959
options,
6060

6161
validate: (cfg, onErr) => {
62-
debug('validating configuration')
62+
debug('validating configuration', cfg)
6363

6464
return _.each(cfg, (value, key) => {
6565
const validationFn = validationRules[key]

0 commit comments

Comments
 (0)