Skip to content

Commit 3e305cd

Browse files
committed
Merge branch 'develop' into tgriesser/spike/spike
* develop: (45 commits) fix: re-enable CYPRESS_INTERNAL_VITE_DEV development (#25364) fix: add skip domain injection description (#25463) fix: revert CSP header and script-src addition (#25445) chore: Update v8 snapshot cache (#25401) feat: Do not strip CSP headers from HTTPResponse (#24760) fix: keep spaces in formatted output in test runner (#24687) fix: Restrict dependency versions to known supported ranges (#25380) chore: Update v8 snapshot cache (#25370) feat: experimental skip domain injection (#25307) chore: support vite v4 for component testing (#25365) feat: Use JSX/TSX in generated spec filenames (#25318) docs(angular): Properties that are spied upon have to be defined within `componentProperties` instead of on root level. (#25359) chore: remove lint-changed from scripts/docs (#25308) chore: bump to 12.3.0 [skip ci] (#25355) fix: make NODE_ENV "production" for prod builds of launchpad (#25320) fix: .contains() should only return one element at all times (#25250) feat: add currentRetry to Cypress API (#25297) chore: release @cypress/webpack-dev-server-v3.2.2 chore: release create-cypress-tests-v2.0.1 fix: change wording for spec creation (#25271) ...
2 parents 04a734a + 991c532 commit 3e305cd

File tree

256 files changed

+4313
-4379
lines changed

Some content is hidden

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

256 files changed

+4313
-4379
lines changed

.circleci/workflows.yml

+4-16
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mainBuildFilters: &mainBuildFilters
2828
only:
2929
- develop
3030
- /^release\/\d+\.\d+\.\d+$/
31-
- 'retry-flake'
31+
- 'macOS-launch-arm-browser'
3232

3333
# usually we don't build Mac app - it takes a long time
3434
# but sometimes we want to really confirm we are doing the right thing
@@ -37,15 +37,15 @@ macWorkflowFilters: &darwin-workflow-filters
3737
when:
3838
or:
3939
- equal: [ develop, << pipeline.git.branch >> ]
40-
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
40+
- equal: [ 'macOS-launch-arm-browser', << pipeline.git.branch >> ]
4141
- matches:
4242
pattern: /^release\/\d+\.\d+\.\d+$/
4343
value: << pipeline.git.branch >>
4444
linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
4545
when:
4646
or:
4747
- equal: [ develop, << pipeline.git.branch >> ]
48-
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
48+
- equal: [ 'macOS-launch-arm-browser', << pipeline.git.branch >> ]
4949
- matches:
5050
pattern: /^release\/\d+\.\d+\.\d+$/
5151
value: << pipeline.git.branch >>
@@ -129,7 +129,7 @@ commands:
129129
- run:
130130
name: Check current branch to persist artifacts
131131
command: |
132-
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "retry-flake" ]]; then
132+
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "macOS-launch-arm-browser" ]]; then
133133
echo "Not uploading artifacts or posting install comment for this branch."
134134
circleci-agent step halt
135135
fi
@@ -2680,12 +2680,6 @@ darwin-x64-workflow: &darwin-x64-workflow
26802680
requires:
26812681
- darwin-x64-node-modules-install
26822682

2683-
- lint:
2684-
name: darwin-x64-lint
2685-
executor: mac
2686-
requires:
2687-
- darwin-x64-build
2688-
26892683
- create-build-artifacts:
26902684
name: darwin-x64-create-build-artifacts
26912685
context:
@@ -2775,12 +2769,6 @@ windows-workflow: &windows-workflow
27752769
requires:
27762770
- windows-build
27772771

2778-
- lint:
2779-
name: windows-lint
2780-
executor: windows
2781-
requires:
2782-
- windows-build
2783-
27842772
- unit-tests:
27852773
name: windows-unit-tests
27862774
executor: windows

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const validators = specifiedRules
2525
)
2626

2727
module.exports = {
28+
root: true,
2829
plugins: [
2930
'@cypress/dev',
3031
'graphql',

CONTRIBUTING.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,8 @@ Many Cypress packages print out debugging information to console via the `debug`
335335
We use [eslint](https://eslint.org/) to lint all JavaScript code and follow rules specified in
336336
[@cypress/eslint-plugin-dev](./npm/eslint-plugin-cypress) plugin.
337337

338-
When you edit files, you can quickly fix all changed files before you commit using
339-
340-
```bash
341-
$ yarn lint-changed --fix
342-
```
343-
344-
When committing files, we run a Git pre-commit hook to lint the staged JS files. See the [`lint-staged` project](https://github.com/okonet/lint-staged).
345-
If this command fails, you may need to run `yarn lint-changed --fix` and commit those changes.
338+
This project uses a Git pre-commit hook to lint staged files before committing. See the [`lint-staged` project](https://github.com/okonet/lint-staged) for details.
339+
`lint-staged` will try to auto-fix any lint errors with `eslint --fix`, so if it fails, you must manually fix the lint errors before committing.
346340

347341
We **DO NOT** use Prettier to format code. You can find [.prettierignore](.prettierignore) file that ignores all files in this repository. To ensure this file is loaded, please always open _the root repository folder_ in your text editor, otherwise your code formatter might execute, reformatting lots of source files.
348342

cli/.eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"extends": "../.eslintrc.js",
32
"rules": {
43
"no-restricted-syntax": [
54
"error",

cli/test/lib/exec/.eslintrc.json

-5
This file was deleted.

cli/types/cypress.d.ts

+15
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ declare namespace Cypress {
420420
titlePath: string[]
421421
}
422422

423+
/**
424+
* Information about current test retry
425+
*/
426+
currentRetry: number
427+
423428
/**
424429
* Information about the browser currently running the tests
425430
*/
@@ -3014,6 +3019,16 @@ declare namespace Cypress {
30143019
* @see https://on.cypress.io/configuration#experimentalModifyObstructiveThirdPartyCode
30153020
*/
30163021
experimentalModifyObstructiveThirdPartyCode: boolean
3022+
/**
3023+
* Disables setting document.domain to the applications super domain on injection.
3024+
* This experiment is to be used for sites that do not work with setting document.domain
3025+
* due to cross-origin issues. Enabling this option no longer allows for default subdomain
3026+
* navigations, and will require the use of cy.origin(). This option takes an array of
3027+
* strings/string globs.
3028+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/domain
3029+
* @default null
3030+
*/
3031+
experimentalSkipDomainInjection: string[] | null
30173032
/**
30183033
* Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm.
30193034
* @default false

npm/angular/.eslintrc

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,5 @@
44
],
55
"extends": [
66
"plugin:@cypress/dev/tests"
7-
],
8-
"env": {
9-
"cypress/globals": true
10-
},
11-
"rules": {
12-
"mocha/no-global-tests": "off",
13-
"no-unused-vars": "off",
14-
"no-console": "off",
15-
"@typescript-eslint/no-unused-vars": "off"
16-
}
7+
]
178
}

npm/angular/src/mount.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export function mount<T> (
350350
* import { mount, createOutputSpy } from '@cypress/angular'
351351
*
352352
* it('Has spy', () => {
353-
* mount(StepperComponent, { change: createOutputSpy('changeSpy') })
353+
* mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } })
354354
* cy.get('[data-cy=increment]').click()
355355
* cy.get('@changeSpy').should('have.been.called')
356356
* })

npm/create-cypress-tests/.eslintrc

+2-24
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,10 @@
77
"plugin:@cypress/dev/general",
88
"plugin:@cypress/dev/tests"
99
],
10-
"parser": "@typescript-eslint/parser",
1110
"env": {
1211
"cypress/globals": true
1312
},
1413
"rules": {
15-
"no-console": "off",
16-
"mocha/no-global-tests": "off",
17-
"@typescript-eslint/no-unused-vars": "off"
18-
},
19-
"overrides": [
20-
{
21-
"files": [
22-
"lib/*"
23-
],
24-
"rules": {
25-
"no-console": 1
26-
}
27-
},
28-
{
29-
"files": [
30-
"**/*.json"
31-
],
32-
"rules": {
33-
"quotes": "off",
34-
"comma-dangle": "off"
35-
}
36-
}
37-
]
14+
"no-console": "off"
15+
}
3816
}

npm/create-cypress-tests/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [create-cypress-tests-v2.0.1](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v2.0.0...create-cypress-tests-v2.0.1) (2023-01-03)
2+
3+
4+
### Bug Fixes
5+
6+
* change wording for spec creation ([#25271](https://github.com/cypress-io/cypress/issues/25271)) ([c12a7e3](https://github.com/cypress-io/cypress/commit/c12a7e37c73d972eb0514e4b602940df210d86c7))
7+
18
# [create-cypress-tests-v2.0.0](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v1.3.0...create-cypress-tests-v2.0.0) (2022-06-13)
29

310

npm/create-cypress-tests/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Here is a list of available configuration options:
4444

4545
`--use-npm` – use npm if yarn available
4646
`--ignore-typescript` – will not create typescript configuration if available
47-
`--ignore-examples` – will create a 1 empty spec file (`cypress/integration/spec.js`) to start with
47+
`--ignore-examples` – will create a 1 template spec file (`cypress/integration/spec.js`) to start with
4848
`--component-tests` – will not ask should setup component testing or not
4949

5050
## License

npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.test.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
/// <reference path="../../../../../cli/types/mocha/index.d.ts" />
22

3-
import * as path from 'path'
43
import { expect } from 'chai'
5-
6-
import * as fs from 'fs-extra'
7-
import { insertValueInJSString, insertValuesInConfigFile } from './configFileUpdater'
8-
const projectRoot = process.cwd()
4+
import { insertValueInJSString } from './configFileUpdater'
95

106
// Test util - if needed outside the tests we can move it to utils
117
const stripIndent = (strings: any, ...args: any) => {

npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import _ from 'lodash'
21
import { parse } from '@babel/parser'
32
import type { File } from '@babel/types'
43
import type { NodePath } from 'ast-types/lib/node-path'

npm/eslint-plugin-dev/.eslintrc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
"extends": [
77
"plugin:promise/recommended",
88
"plugin:@cypress/dev/general"
9-
],
10-
"rules": {}
9+
]
1110
}

npm/eslint-plugin-dev/lib/scripts/.eslintrc.json

-5
This file was deleted.

npm/eslint-plugin-dev/test/fixtures/.eslintrc

-6
This file was deleted.

npm/grep/.eslintrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
},
1111
"rules": {
1212
"mocha/no-global-tests": "off",
13-
"no-unused-vars": "off",
1413
"no-console": "off",
15-
"@typescript-eslint/no-unused-vars": "off",
1614
"no-restricted-syntax": "off"
1715
}
18-
}
16+
}

npm/grep/cypress/e2e/nested-describe-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('grand', () => {
1212
describe('top', { tags: '@smoke' }, () => {
1313
describe('middle', () => {
1414
context('bottom', { tags: ['@integration', '@fast'] }, () => {
15-
it('runs too', () => {});
15+
it('runs too', () => {})
1616
})
1717
})
1818
})

npm/grep/cypress/e2e/omit-and-skip-spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// @ts-check
44
describe('Page', () => {
55
describe('List', { tags: ['@us1'] }, () => {
6+
// eslint-disable-next-line @cypress/dev/skip-comment
67
it.skip('first test', () => {})
78
it('second test', () => {})
89
it('third test', () => {})

npm/grep/cypress/e2e/skip-spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @cypress/dev/skip-comment */
12
/// <reference types="cypress" />
23
describe('tests that use .skip', () => {
34
// use a template literal

npm/grep/cypress/e2e/ts-spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('TypeScript spec', () => {
1313

1414
it('loads', () => {
1515
const n: number = 1
16+
1617
cy.wrap(n).should('eq', 1)
1718
})
1819

@@ -24,6 +25,7 @@ describe('TypeScript spec', () => {
2425
const p: Person = {
2526
name: 'Joe',
2627
}
28+
2729
cy.wrap(p).should('have.property', 'name', 'Joe')
2830
})
2931
})

npm/grep/cypress/support/e2e.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// <reference types="cypress" />
33

44
import cypressGrep from '../../src/support'
5+
56
// register the grep feature
67
// https://github.com/cypress-io/cypress-grep
7-
cypressGrep()
8+
cypressGrep()

npm/grep/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "src/support.js",
66
"scripts": {
77
"cy:run": "node ../../scripts/cypress.js run --config specPattern='**/unit.js'",
8-
"cy:open": "node ../../scripts/cypress.js open --e2e -b electron --config specPattern='**/unit.js'"
8+
"cy:open": "node ../../scripts/cypress.js open --e2e -b electron --config specPattern='**/unit.js'",
9+
"lint": "eslint . --ext .js,.ts"
910
},
1011
"dependencies": {
1112
"debug": "^4.3.2",

npm/react/.eslintrc

+1-21
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"rules": {
2020
"no-console": "off",
2121
"mocha/no-global-tests": "off",
22-
"@typescript-eslint/no-unused-vars": "off",
2322
"react/jsx-filename-extension": [
2423
"warn",
2524
{
@@ -30,24 +29,5 @@
3029
]
3130
}
3231
]
33-
},
34-
"overrides": [
35-
{
36-
"files": [
37-
"lib/*"
38-
],
39-
"rules": {
40-
"no-console": 1
41-
}
42-
},
43-
{
44-
"files": [
45-
"**/*.json"
46-
],
47-
"rules": {
48-
"quotes": "off",
49-
"comma-dangle": "off"
50-
}
51-
}
52-
]
32+
}
5333
}

npm/react/cypress.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
},
99
'experimentalFetchPolyfill': true,
1010
'component': {
11+
experimentalSingleTabRunMode: true,
1112
'excludeSpecPattern': [
1213
'**/__snapshots__/*',
1314
'**/__image_snapshots__/*',

npm/svelte/.eslintrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
},
1111
"rules": {
1212
"mocha/no-global-tests": "off",
13-
"no-unused-vars": "off",
14-
"no-console": "off",
15-
"@typescript-eslint/no-unused-vars": "off"
13+
"no-console": "off"
1614
}
1715
}

npm/svelte/src/mount.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const cleanup = () => {
3131
// Extract the component name from the object passed to mount
3232
const getComponentDisplayName = <T extends SvelteComponent>(Component: SvelteConstructor<T>): string => {
3333
if (Component.name) {
34-
const [_, match] = /Proxy\<(\w+)\>/.exec(Component.name) || []
34+
const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || []
3535

3636
return match || Component.name
3737
}

0 commit comments

Comments
 (0)