Skip to content

Commit

Permalink
chore: run all tests with bidi by default (#32572)
Browse files Browse the repository at this point in the history
Only use expectation files on CI to save resources
  • Loading branch information
yury-s committed Sep 11, 2024
1 parent 1981989 commit fd1f325
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests_bidi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ jobs:
if: matrix.channel == 'bidi-firefox-beta'
- name: Run tests
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run biditest -- --project=${{ matrix.channel }}*
env:
PWTEST_USE_BIDI_EXPECTATIONS: '1'
2 changes: 2 additions & 0 deletions tests/bidi/expectationUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export type TestExpectation = 'unknown' | 'flaky' | 'pass' | 'fail' | 'timeout';
type ShouldSkipPredicate = (info: TestInfo) => boolean;

export async function createSkipTestPredicate(projectName: string): Promise<ShouldSkipPredicate> {
if (!process.env.PWTEST_USE_BIDI_EXPECTATIONS)
return () => false;
const expectationsMap = await parseBidiExpectations(projectName);
return (info: TestInfo) => {
const key = [info.project.name, ...info.titlePath].join(' › ');
Expand Down

0 comments on commit fd1f325

Please sign in to comment.