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

This commit is contained in:
Max Schmitt 2025-01-27 14:17:47 +01:00 committed by GitHub
parent 52580d640d
commit 8d716b28a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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);
})();
}