test: add canary specific expectation file (#12383)

This commit is contained in:
Alex Rudenko 2024-05-03 10:31:21 +02:00 committed by GitHub
parent dc303f061b
commit 0af4664b8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 0 deletions

View File

@ -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

View 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"
}
]

View 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)
);