mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: add canary specific expectation file (#12383)
This commit is contained in:
parent
dc303f061b
commit
0af4664b8a
2
.github/workflows/canary.yml
vendored
2
.github/workflows/canary.yml
vendored
@ -55,6 +55,8 @@ jobs:
|
|||||||
- name: Install Chrome Canary
|
- name: Install Chrome Canary
|
||||||
id: browser
|
id: browser
|
||||||
run: node tools/download_chrome_canary.mjs $HOME/.cache/puppeteer/chrome-canary
|
run: node tools/download_chrome_canary.mjs $HOME/.cache/puppeteer/chrome-canary
|
||||||
|
- name: Apply Canary expectations
|
||||||
|
run: node tools/merge-canary-test-expectations.mjs
|
||||||
- name: Run all tests (for non-Linux)
|
- name: Run all tests (for non-Linux)
|
||||||
if: ${{ matrix.os != 'ubuntu-latest' }}
|
if: ${{ matrix.os != 'ubuntu-latest' }}
|
||||||
run: npm run test -- --shard '${{ matrix.shard }}' --test-suite ${{ matrix.suite }} --save-stats-to /tmp/artifacts/${{ github.event_name }}_INSERTID.json
|
run: npm run test -- --shard '${{ matrix.shard }}' --test-suite ${{ matrix.suite }} --save-stats-to /tmp/artifacts/${{ github.event_name }}_INSERTID.json
|
||||||
|
16
test/CanaryTestExpectations.json
Normal file
16
test/CanaryTestExpectations.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"testIdPattern": "[pdf.spec] Page.pdf can print to PDF with outline",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "headful"],
|
||||||
|
"expectations": ["PASS"],
|
||||||
|
"comment": "fixed in canary"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[pdf.spec] Page.pdf can print to PDF with outline",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "headless"],
|
||||||
|
"expectations": ["PASS"],
|
||||||
|
"comment": "fixed in canary"
|
||||||
|
}
|
||||||
|
]
|
20
tools/merge-canary-test-expectations.mjs
Normal file
20
tools/merge-canary-test-expectations.mjs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright 2024 Google Inc.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Modifies test/TestExpectations.json in place.
|
||||||
|
|
||||||
|
import fs from 'fs';
|
||||||
|
|
||||||
|
const source = 'test/TestExpectations.json';
|
||||||
|
const testExpectations = JSON.parse(fs.readFileSync(source, 'utf-8'));
|
||||||
|
const canaryTestExpectations = JSON.parse(
|
||||||
|
fs.readFileSync('test/CanaryTestExpectations.json', 'utf-8')
|
||||||
|
);
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
source,
|
||||||
|
JSON.stringify([...testExpectations, ...canaryTestExpectations], null, 2)
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user