mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-11 12:33:45 +03:00
19 lines
623 B
JavaScript
19 lines
623 B
JavaScript
const report = require(process.argv[2]);
|
|
if (report.suites[0].specs[0].title !== 'sample test') {
|
|
console.log(`Wrong spec title`);
|
|
process.exit(1);
|
|
}
|
|
const projects = report.suites[0].specs[0].tests.map(t => t.projectName).sort();
|
|
if (projects.length !== 3 || projects[0] !== 'chromium' || projects[1] !== 'firefox' || projects[2] !== 'webkit') {
|
|
console.log(`Wrong browsers`);
|
|
process.exit(1);
|
|
}
|
|
for (const test of report.suites[0].specs[0].tests) {
|
|
if (test.results[0].status !== 'passed') {
|
|
console.log(`Test did not pass`);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
console.log('Report check SUCCESS');
|
|
process.exit(0);
|