Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(bidi): use full test title in CSV expectations (#34496)

Max Schmitt8d716b28a1e8
diff --git a/.github/workflows/tests_bidi.yml b/.github/workflows/tests_bidi.yml
index e4118f1377..f2e38765f7 100644
--- a/.github/workflows/tests_bidi.yml
+++ b/.github/workflows/tests_bidi.yml
@@ -8,6 +8,7 @@ on:
paths:
- .github/workflows/tests_bidi.yml
- packages/playwright-core/src/server/bidi/**
+ - tests/bidi/**
schedule:
# Run every day at midnight
- cron: '0 0 * * *'
diff --git a/tests/bidi/csvReporter.ts b/tests/bidi/csvReporter.ts
index 821f6e6f48..0c5b94330b 100644
--- a/tests/bidi/csvReporter.ts
+++ b/tests/bidi/csvReporter.ts
@@ -50,7 +50,8 @@ class CsvReporter implements Reporter {
if (test.ok() && !fixme)
continue;
const row = [];
- row.push(csvEscape(`${file.title} :: ${test.title}`));
+ const [, , , ...titles] = test.titlePath();
+ row.push(csvEscape(`${file.title} :: ${titles.join(' › ')}`));
row.push(test.expectedStatus);
row.push(test.outcome());
if (fixme) {
@@ -67,7 +68,7 @@ class CsvReporter implements Reporter {
const csv = rows.map(r => r.join(',')).join('\n');
const reportFile = path.resolve(this._options.configDir, this._options.outputFile || 'test-results.csv');
this._pendingWrite = (async () => {
- await fs.mkdirSync(path.dirname(reportFile), { recursive: true });
+ await fs.promises.mkdir(path.dirname(reportFile), { recursive: true });
await fs.promises.writeFile(reportFile, csv);
})();
}