Skip to content

Commit 7b98578

Browse files
chore: test test
1 parent 5fdad7c commit 7b98578

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/workflows/quality.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -248,16 +248,20 @@ jobs:
248248
let tests = [];
249249
const fullSuiteTitle = parentTitle ? `${parentTitle} > ${suite.title}` : suite.title;
250250
251-
// Add tests from specs
252251
if (suite.specs) {
253-
console.log(JSON.stringify(suite.specs));
254-
tests.push(...suite.specs.map(spec => ({
255-
title: spec.title,
256-
fullTitle: `${fullSuiteTitle} > ${spec.title}`,
257-
status: spec.ok ? 'passed' : spec.ok === false ? 'failed' : 'skipped',
258-
file: suite.file,
259-
skipped: spec.ok === true || spec.ok === false ? false : true
260-
})));
252+
tests.push(...suite.specs.map(spec => {
253+
const isSkipped = spec.tests && spec.tests[0] &&
254+
(spec.tests[0].annotations?.some(a => a.type === 'skip') ||
255+
spec.tests[0].status === 'skipped');
256+
257+
return {
258+
title: spec.title,
259+
fullTitle: `${fullSuiteTitle} > ${spec.title}`,
260+
status: isSkipped ? 'skipped' : (spec.ok ? 'passed' : 'failed'),
261+
file: suite.file,
262+
skipped: isSkipped
263+
};
264+
}));
261265
}
262266
263267
// Recursively process nested suites
@@ -315,11 +319,9 @@ jobs:
315319
}
316320
317321
// Find skipped tests (both newly skipped and already skipped)
318-
for (const [fullTitle, test] of currentTests) {
319-
if (test.skipped) {
320-
testComparison.skipped.push(`${test.title} (${test.file})`);
321-
}
322-
}
322+
testComparison.skipped = testResults.tests
323+
.filter(t => t.skipped)
324+
.map(test => `${test.title} (${test.file})`);
323325
} else {
324326
console.log('Main branch test results file not found');
325327
mainTestResults = { tests: [] };
@@ -355,13 +357,13 @@ jobs:
355357
| ${testResults.total} | ${testResults.passed} | ${testResults.failed} | ${testResults.flaky} | ${testResults.skipped} |
356358
357359
<details>
358-
<summary>Test Changes Summary ✨${testComparison.new.length} ⏭️${testResults.skipped} 🗑️${testComparison.deleted.length}</summary>
360+
<summary>Test Changes Summary ✨${testComparison.new.length} ⏭️${testComparison.skipped.length} 🗑️${testComparison.deleted.length}</summary>
359361
360362
#### ✨ New Tests (${testComparison.new.length})
361363
${testComparison.new.length > 0 ? testComparison.new.map((test, i) => `${i + 1}. ${test}`).join('\n') : 'None'}
362364
363-
#### ⏭️ Skipped Tests (${testResults.skipped})
364-
${testResults.tests.filter(t => t.skipped).map((test, i) => `${i + 1}. ${test.title} (${test.file})`).join('\n') || 'None'}
365+
#### ⏭️ Skipped Tests (${testComparison.skipped.length})
366+
${testComparison.skipped.length > 0 ? testComparison.skipped.map((test, i) => `${i + 1}. ${test}`).join('\n') : 'None'}
365367
366368
#### 🗑️ Deleted Tests (${testComparison.deleted.length})
367369
${testComparison.deleted.length > 0 ? testComparison.deleted.map((test, i) => `${i + 1}. ${test}`).join('\n') : 'None'}

0 commit comments

Comments
 (0)