Skip to content

Commit 4e140a2

Browse files
committed
Merge branch 'develop' into feature-multidomain
2 parents fef49f4 + 5955544 commit 4e140a2

File tree

160 files changed

+1125
-20755
lines changed

Some content is hidden

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

160 files changed

+1125
-20755
lines changed

.vscode/terminals.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@
2323
"execute": false,
2424
"command": "yarn cypress:run --project ../project"
2525
},
26-
{
27-
"name": "cypress open (CT)",
28-
"focus": true,
29-
"onlySingle": true,
30-
"execute": true,
31-
"cwd": "[cwd]/packages/server-ct",
32-
"command": "yarn cypress:open"
33-
},
3426
{
3527
"name": "packages/server test-e2e",
3628
"focus": true,

circle.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,18 +1034,6 @@ jobs:
10341034
path: /tmp/cypress
10351035
- store-npm-logs
10361036

1037-
server-ct-unit-tests:
1038-
<<: *defaults
1039-
parallelism: 1
1040-
steps:
1041-
- restore_cached_workspace
1042-
- run: yarn test-unit --scope @packages/server-ct
1043-
- verify-mocha-results:
1044-
expectedResultCount: 1
1045-
- store_test_results:
1046-
path: /tmp/cypress
1047-
- store-npm-logs
1048-
10491037
server-integration-tests:
10501038
<<: *defaults
10511039
resource_class: medium

cli/types/cypress.d.ts

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ declare namespace Cypress {
2222
password: string
2323
}
2424

25+
interface RemoteState {
26+
auth?: {
27+
username: string
28+
password: string
29+
}
30+
domainName: string
31+
strategy: 'file' | 'http'
32+
origin: string
33+
fileServer: string
34+
props: Record<string, any>
35+
visiting: string
36+
}
37+
2538
interface Backend {
2639
/**
2740
* Firefox only: Force Cypress to run garbage collection routines.
@@ -2488,6 +2501,47 @@ declare namespace Cypress {
24882501
cmdKey: boolean
24892502
}
24902503

2504+
interface PEMCert {
2505+
/**
2506+
* Path to the certificate file, relative to project root.
2507+
*/
2508+
cert: string
2509+
/**
2510+
* Path to the private key file, relative to project root.
2511+
*/
2512+
key: string
2513+
/**
2514+
* Path to a text file containing the passphrase, relative to project root.
2515+
*/
2516+
passphrase?: string
2517+
}
2518+
2519+
interface PFXCert {
2520+
/**
2521+
* Path to the certificate container, relative to project root.
2522+
*/
2523+
pfx: string
2524+
/**
2525+
* Path to a text file containing the passphrase, relative to project root.
2526+
*/
2527+
passphrase?: string
2528+
}
2529+
2530+
interface ClientCertificate {
2531+
/**
2532+
* URL to match requests against. Wildcards following [minimatch](https://github.com/isaacs/minimatch) rules are supported.
2533+
*/
2534+
url: string
2535+
/**
2536+
* Paths to one or more CA files to validate certs against, relative to project root.
2537+
*/
2538+
ca?: string[]
2539+
/**
2540+
* A PEM format certificate/private key pair or PFX certificate container
2541+
*/
2542+
certs: PEMCert[] | PFXCert[]
2543+
}
2544+
24912545
interface ResolvedConfigOptions {
24922546
/**
24932547
* Url used as prefix for [cy.visit()](https://on.cypress.io/visit) or [cy.request()](https://on.cypress.io/request) command’s url
@@ -2750,6 +2804,11 @@ declare namespace Cypress {
27502804
* @default {}
27512805
*/
27522806
e2e: Omit<ResolvedConfigOptions, TestingType>
2807+
2808+
/**
2809+
* An array of objects defining the certificates
2810+
*/
2811+
clientCertificates: ClientCertificate[]
27532812
}
27542813

27552814
/**
@@ -2810,19 +2869,15 @@ declare namespace Cypress {
28102869
projectName: string
28112870
projectRoot: string
28122871
proxyUrl: string
2872+
remote: RemoteState
28132873
report: boolean
28142874
reporterRoute: string
28152875
reporterUrl: string
28162876
socketId: null | string
28172877
socketIoCookie: string
28182878
socketIoRoute: string
2819-
spec: {
2820-
absolute: string
2821-
name: string
2822-
relative: string
2823-
specFilter: null | string
2824-
specType: 'integration' | 'component'
2825-
}
2879+
spec: Cypress['spec']
2880+
specs: Array<Cypress['spec']>
28262881
xhrRoute: string
28272882
xhrUrl: string
28282883
}
@@ -5275,7 +5330,7 @@ declare namespace Cypress {
52755330
tag?: string
52765331
}
52775332

5278-
interface DevServerOptions {
5333+
interface DevServerConfig {
52795334
specs: Spec[]
52805335
config: ResolvedConfigOptions & RuntimeConfigOptions
52815336
devServerEvents: NodeJS.EventEmitter
@@ -5294,7 +5349,7 @@ declare namespace Cypress {
52945349
(action: 'before:spec', fn: (spec: Spec) => void | Promise<void>): void
52955350
(action: 'before:browser:launch', fn: (browser: Browser, browserLaunchOptions: BrowserLaunchOptions) => void | BrowserLaunchOptions | Promise<BrowserLaunchOptions>): void
52965351
(action: 'file:preprocessor', fn: (file: FileObject) => string | Promise<string>): void
5297-
(action: 'dev-server:start', fn: (file: DevServerOptions) => Promise<ResolvedDevServerConfig>): void
5352+
(action: 'dev-server:start', fn: (file: DevServerConfig) => Promise<ResolvedDevServerConfig>): void
52985353
(action: 'task', tasks: Tasks): void
52995354
}
53005355

npm/angular/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@cypress/angular",
33
"version": "0.0.0-development",
4+
"description": "Test Angular components using Cypress",
45
"private": true,
56
"main": "dist/index.js",
67
"scripts": {
@@ -84,5 +85,12 @@
8485
"type": "git",
8586
"url": "https://github.com/cypress-io/cypress.git"
8687
},
87-
"homepage": "https://on.cypress.io/component-testing"
88-
}
88+
"homepage": "https://on.cypress.io/component-testing",
89+
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
90+
"contributors": [
91+
{
92+
"name": "Jean-Michel Leclercq",
93+
"social": "@LeJeanbono"
94+
}
95+
]
96+
}

npm/cypress-schematic/src/builders/cypress/cypressBuilderOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { JsonObject } from '@angular-devkit/core'
33
export interface CypressBuilderOptions extends JsonObject {
44
baseUrl: string
55
configFile: string | false
6-
browser: 'electron' | 'chrome' | 'chromium' | 'canary' | 'firefox' | string
6+
browser: 'electron' | 'chrome' | 'chromium' | 'canary' | 'firefox' | 'edge' | string
77
devServerTarget: string
88
env: Record<string, string>
99
quiet: boolean

npm/cypress-schematic/src/builders/cypress/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"chrome",
2828
"chromium",
2929
"canary",
30-
"firefox"
30+
"firefox",
31+
"edge"
3132
]
3233
},
3334
"devServerTarget": {

npm/react/examples/a11y/cypress/plugins/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
// load file preprocessor that comes with this plugin
1+
// @ts-check
2+
3+
// load file devServer that comes with this plugin
24
// https://github.com/bahmutov/cypress-react-unit-test#install
3-
const preprocessor = require('@cypress/react/plugins/react-scripts')
5+
const devServer = require('@cypress/react/plugins/react-scripts')
46

7+
/**
8+
* @type Cypress.PluginConfig
9+
*/
510
module.exports = (on, config) => {
6-
preprocessor(on, config)
11+
devServer(on, config)
712

813
// IMPORTANT to return the config object
914
// with the any changed environment variables

npm/react/examples/craco/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Use the plugin:
77

88
// import your craco.config.js
99
const cracoConfig = require('../../craco.config.js')
10-
const injectDevServer = require('@cypress/react/plugins/craco')
10+
const devServer = require('@cypress/react/plugins/craco')
1111

1212
module.exports = (on, config) => {
13-
injectDevServer(on, config, cracoConfig)
13+
devServer(on, config, cracoConfig)
1414

1515
return config
1616
}
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
// @ts-check
2+
13
const cracoConfig = require('../../craco.config.js')
2-
const injectDevServer = require('@cypress/react/plugins/craco')
4+
const devServer = require('@cypress/react/plugins/craco')
35

6+
/**
7+
* @type Cypress.PluginConfig
8+
*/
49
module.exports = (on, config) => {
5-
injectDevServer(on, config, cracoConfig)
10+
devServer(on, config, cracoConfig)
611

712
return config
813
}

npm/react/examples/find-webpack/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ Here we are adding some Component Testing specific options, hence the `"componen
3838
The last thing we need to is tell Cypress to use `@cypress/webpack-dev-server` for component tests. Plugins are explained in detail in the [Cypress documentation](https://docs.cypress.io/guides/tooling/plugins-guide#Installing-plugins). By default plugins are loaded from `cypress/plugins/index.js`. Create that file and add:
3939

4040
```js
41-
const injectDevServer = require("@cypress/react/plugins/react-scripts")
41+
const devServer = require("@cypress/react/plugins/react-scripts")
4242

4343
module.exports = (on, config) => {
44-
injectDevServer(on, config)
44+
devServer(on, config)
4545
return config
4646
}
4747
```

0 commit comments

Comments
 (0)