From 7769010e6e146a81504fa921fa3931867dbbc505 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 31 Dec 2024 13:18:25 -0800 Subject: [PATCH] chore(bidi): mark test expected to timeout as fixme (#34176) --- tests/bidi/csvReporter.ts | 14 ++++++++++---- tests/config/browserTest.ts | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/bidi/csvReporter.ts b/tests/bidi/csvReporter.ts index 1da6b6b697..f227550ef3 100644 --- a/tests/bidi/csvReporter.ts +++ b/tests/bidi/csvReporter.ts @@ -45,15 +45,21 @@ class CsvReporter implements Reporter { for (const project of this._suite.suites) { for (const file of project.suites) { for (const test of file.allTests()) { - if (test.ok()) + // Report fixme tests as failing. + const fixme = test.annotations.find(a => a.type === 'fixme'); + if (test.ok() && !fixme) continue; const row = []; row.push(csvEscape(`${file.title} :: ${test.title}`)); row.push(test.expectedStatus); row.push(test.outcome()); - const result = test.results.find(r => r.error); - const errorMessage = stripAnsi(result?.error?.message.replace(/\s+/g, ' ').trim().substring(0, 1024)); - row.push(csvEscape(errorMessage ?? '')); + if (fixme) { + row.push('fixme' + (fixme.description ? `: ${fixme.description}` : '')); + } else { + const result = test.results.find(r => r.error); + const errorMessage = stripAnsi(result?.error?.message.replace(/\s+/g, ' ').trim().substring(0, 1024)); + row.push(csvEscape(errorMessage ?? '')); + } rows.push(row); } } diff --git a/tests/config/browserTest.ts b/tests/config/browserTest.ts index 8477359407..7836b2e38c 100644 --- a/tests/config/browserTest.ts +++ b/tests/config/browserTest.ts @@ -188,8 +188,7 @@ const test = baseTest.extend }, { scope: 'worker' }], autoSkipBidiTest: [async ({ bidiTestSkipPredicate }, run) => { - if (bidiTestSkipPredicate(test.info())) - test.skip(true); + test.fixme(bidiTestSkipPredicate(test.info()), 'marked as timeout in bidi expectations'); await run(); }, { auto: true, scope: 'test' }], });