snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
20
tests/prosody/fix-allure-report.cjs
Normal file
20
tests/prosody/fix-allure-report.cjs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Post-process the generated Allure report to set default sort order to
|
||||
// "order" (the order tests ran) instead of alphabetical. Mirrors the same
|
||||
// hack used in tests/wdio.conf.ts.
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const indexFile = path.join(__dirname, 'allure-report', 'index.html');
|
||||
|
||||
if (!fs.existsSync(indexFile)) {
|
||||
console.warn('fix-allure-report: index.html not found, skipping');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const setting = '{"treeSorting":{"sorter":"sorter.order","ascending":true}}';
|
||||
const script = `<script>localStorage.setItem("ALLURE_REPORT_SETTINGS_SUITES", '${setting}');</script>`;
|
||||
|
||||
const content = fs.readFileSync(indexFile, 'utf8');
|
||||
fs.writeFileSync(indexFile, content.replace('<body>', `<body>${script}`));
|
||||
Reference in New Issue
Block a user