chore: run all tests with bidi by default (#32572)

Only use expectation files on CI to save resources
This commit is contained in:
Yury Semikhatsky 2024-09-11 14:24:32 -07:00 committed by GitHub
parent 1981989aef
commit fd1f32556b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -42,3 +42,5 @@ jobs:
if: matrix.channel == 'bidi-firefox-beta' if: matrix.channel == 'bidi-firefox-beta'
- name: Run tests - name: Run tests
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run biditest -- --project=${{ matrix.channel }}* run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run biditest -- --project=${{ matrix.channel }}*
env:
PWTEST_USE_BIDI_EXPECTATIONS: '1'

View File

@ -23,6 +23,8 @@ export type TestExpectation = 'unknown' | 'flaky' | 'pass' | 'fail' | 'timeout';
type ShouldSkipPredicate = (info: TestInfo) => boolean; type ShouldSkipPredicate = (info: TestInfo) => boolean;
export async function createSkipTestPredicate(projectName: string): Promise<ShouldSkipPredicate> { export async function createSkipTestPredicate(projectName: string): Promise<ShouldSkipPredicate> {
if (!process.env.PWTEST_USE_BIDI_EXPECTATIONS)
return () => false;
const expectationsMap = await parseBidiExpectations(projectName); const expectationsMap = await parseBidiExpectations(projectName);
return (info: TestInfo) => { return (info: TestInfo) => {
const key = [info.project.name, ...info.titlePath].join(' '); const key = [info.project.name, ...info.titlePath].join(' ');