test: roll to folio@0.4.0-alpha27 (#6897)

This commit is contained in:
Dmitry Gozman 2021-06-03 22:06:59 -07:00 committed by GitHub
parent 85786b1a11
commit 21b00d0bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 29 deletions

View File

@ -39,10 +39,12 @@ You can use different reporters locally and on CI.
// playwright.config.js
module.exports = {
reporter: !process.env.CI
// A list of tests for the terminal
// Default 'list' reporter for the terminal
? 'list'
// Very concise "dot" reporter and a comprehensive json report for CI
: ['dot', { name: 'json', outputFile: 'test-results.json' }],
// Two reporters for CI:
// - concise "dot"
// - comprehensive json report
: [ ['dot'], [ 'json', { outputFile: 'test-results.json' }] ],
};
```
@ -51,11 +53,12 @@ module.exports = {
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
reporter: !process.env.CI
// A list of tests for the terminal
// Default 'list' reporter for the terminal
? 'list'
// Very concise "dot" reporter and a comprehensive json report for CI
: ['dot', { name: 'json', outputFile: 'test-results.json' }],
// Two reporters for CI:
// - concise "dot"
// - comprehensive json report
: [ ['dot'], [ 'json', { outputFile: 'test-results.json' }] ],
};
export default config;
```
@ -190,7 +193,7 @@ In configuration file, pass options directly:
```js js-flavor=js
// playwright.config.js
module.exports = {
reporter: { name: 'json', outputFile: 'results.json' },
reporter: [ ['json', { outputFile: 'results.json' }] ],
};
```
@ -199,7 +202,7 @@ module.exports = {
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
reporter: { name: 'json', outputFile: 'results.json' },
reporter: [ ['json', { outputFile: 'results.json' }] ],
};
export default config;
```
@ -217,7 +220,7 @@ In configuration file, pass options directly:
```js js-flavor=js
// playwright.config.js
module.exports = {
reporter: { name: 'junit', outputFile: 'results.xml' },
reporter: [ ['junit', { outputFile: 'results.xml' }] ],
};
```
@ -226,7 +229,7 @@ module.exports = {
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
reporter: { name: 'junit', outputFile: 'results.xml' },
reporter: [ ['junit', { outputFile: 'results.xml' }] ],
};
export default config;
```

14
package-lock.json generated
View File

@ -55,7 +55,7 @@
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-react-hooks": "^4.2.0",
"file-loader": "^6.1.0",
"folio": "=0.4.0-alpha26",
"folio": "=0.4.0-alpha27",
"formidable": "^1.2.2",
"html-webpack-plugin": "^4.4.1",
"ncp": "^2.0.0",
@ -4199,9 +4199,9 @@
}
},
"node_modules/folio": {
"version": "0.4.0-alpha26",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.4.0-alpha26.tgz",
"integrity": "sha512-OTBrLhzv2iZbaawCiQ9tMnHB41TdORiTd9IsRtuDHljhcgQUlvNEemVoliYuZeiyPbWuxRuzHuO10sKnnx23CA==",
"version": "0.4.0-alpha27",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.4.0-alpha27.tgz",
"integrity": "sha512-IjCe0ds6N++F2rVKGHm8lXLqH4smGiwZMP5tylFR7PQykU+i9eGKka1TtxXxhReAH9DMEb3+YRWfzZZdF43MXg==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.12.13",
@ -13205,9 +13205,9 @@
}
},
"folio": {
"version": "0.4.0-alpha26",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.4.0-alpha26.tgz",
"integrity": "sha512-OTBrLhzv2iZbaawCiQ9tMnHB41TdORiTd9IsRtuDHljhcgQUlvNEemVoliYuZeiyPbWuxRuzHuO10sKnnx23CA==",
"version": "0.4.0-alpha27",
"resolved": "https://registry.npmjs.org/folio/-/folio-0.4.0-alpha27.tgz",
"integrity": "sha512-IjCe0ds6N++F2rVKGHm8lXLqH4smGiwZMP5tylFR7PQykU+i9eGKka1TtxXxhReAH9DMEb3+YRWfzZZdF43MXg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",

View File

@ -80,7 +80,7 @@
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-react-hooks": "^4.2.0",
"file-loader": "^6.1.0",
"folio": "=0.4.0-alpha26",
"folio": "=0.4.0-alpha27",
"formidable": "^1.2.2",
"html-webpack-plugin": "^4.4.1",
"ncp": "^2.0.0",

View File

@ -30,7 +30,7 @@ const tsConfig = 'playwright.config.ts';
const jsConfig = 'playwright.config.js';
const defaultConfig: Config = {
preserveOutput: process.env.CI ? 'failures-only' : 'always',
reporter: [defaultReporter],
reporter: [ [defaultReporter] ],
timeout: defaultTimeout,
updateSnapshots: process.env.CI ? 'none' : 'missing',
workers: Math.ceil(require('os').cpus().length / 2),
@ -167,9 +167,7 @@ function overridesFromOptions(options: { [key: string]: any }): Config {
quiet: options.quiet ? options.quiet : undefined,
repeatEach: options.repeatEach ? parseInt(options.repeatEach, 10) : undefined,
retries: options.retries ? parseInt(options.retries, 10) : undefined,
reporter: (options.reporter && options.reporter.length) ? options.reporter.split(',').map((r: string) => {
return builtinReporters.includes(r) ? r : { require: r };
}) : undefined,
reporter: (options.reporter && options.reporter.length) ? options.reporter.split(',').map((r: string) => [r]) : undefined,
shard: shardPair ? { current: shardPair[0] - 1, total: shardPair[1] } : undefined,
timeout: isDebuggerAttached ? 0 : (options.timeout ? parseInt(options.timeout, 10) : undefined),
updateSnapshots: options.updateSnapshots ? 'all' as const : undefined,

View File

@ -32,8 +32,8 @@ const config: folio.Config<CommonOptions & PlaywrightOptions> = {
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [
'dot',
{ name: 'json', outputFile: path.join(outputDir, 'report.json') },
[ 'dot' ],
[ 'json', { outputFile: path.join(outputDir, 'report.json') } ],
] : 'line',
projects: [],
};

View File

@ -54,8 +54,8 @@ const config: folio.Config<CommonOptions & PlaywrightOptions> = {
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 3 : 0,
reporter: process.env.CI ? [
'dot',
{ name: 'json', outputFile: path.join(outputDir, 'report.json') },
[ 'dot' ],
[ 'json', { outputFile: path.join(outputDir, 'report.json') } ],
] : 'line',
projects: [],
};

View File

@ -32,8 +32,8 @@ const config: folio.Config<CommonOptions & PlaywrightOptions> = {
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 3 : 0,
reporter: process.env.CI ? [
'dot',
{ name: 'json', outputFile: path.join(outputDir, 'report.json') },
[ 'dot' ],
[ 'json', { outputFile: path.join(outputDir, 'report.json') } ],
] : 'line',
projects: [],
};