Skip to content

Commit 7aef4dd

Browse files
fix: fancy report
1 parent 75bf08e commit 7aef4dd

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

.github/workflows/quality.yml

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,11 @@ jobs:
251251
// Add tests from specs
252252
if (suite.specs) {
253253
tests.push(...suite.specs.map(spec => ({
254-
title: `${fullSuiteTitle} > ${spec.title}`,
254+
title: spec.title,
255+
fullTitle: `${fullSuiteTitle} > ${spec.title}`,
255256
status: spec.ok ? 'passed' : spec.skipped ? 'skipped' : 'failed',
256-
file: suite.file
257+
file: suite.file,
258+
skipped: spec.skipped || false
257259
})));
258260
}
259261
@@ -294,28 +296,27 @@ jobs:
294296
mainTestResults = { tests: allTests };
295297
296298
// Compare tests
297-
const currentTests = new Map(testResults.tests.map(t => [t.title, t]));
298-
const mainTests = new Map(mainTestResults.tests.map(t => [t.title, t]));
299+
const currentTests = new Map(testResults.tests.map(t => [t.fullTitle, t]));
300+
const mainTests = new Map(mainTestResults.tests.map(t => [t.fullTitle, t]));
299301
300302
// Find new tests
301-
for (const [title, test] of currentTests) {
302-
if (!mainTests.has(title)) {
303-
testComparison.new.push(`${test.file}: ${title}`);
303+
for (const [fullTitle, test] of currentTests) {
304+
if (!mainTests.has(fullTitle)) {
305+
testComparison.new.push(`${test.title} (${test.file})`);
304306
}
305307
}
306308
307309
// Find deleted tests
308-
for (const [title, test] of mainTests) {
309-
if (!currentTests.has(title)) {
310-
testComparison.deleted.push(`${test.file}: ${title}`);
310+
for (const [fullTitle, test] of mainTests) {
311+
if (!currentTests.has(fullTitle)) {
312+
testComparison.deleted.push(`${test.title} (${test.file})`);
311313
}
312314
}
313315
314-
// Find newly skipped tests
315-
for (const [title, test] of currentTests) {
316-
const mainTest = mainTests.get(title);
317-
if (mainTest && mainTest.status !== 'skipped' && test.status === 'skipped') {
318-
testComparison.skipped.push(`${test.file}: ${title}`);
316+
// Find skipped tests (both newly skipped and already skipped)
317+
for (const [fullTitle, test] of currentTests) {
318+
if (test.skipped) {
319+
testComparison.skipped.push(`${test.title} (${test.file})`);
319320
}
320321
}
321322
} else {
@@ -355,23 +356,20 @@ jobs:
355356
<details>
356357
<summary>Test Changes Summary</summary>
357358
358-
${testComparison.new.length > 0 ? `
359-
#### 🆕 New Tests:
360-
${testComparison.new.map(test => `- ${test}`).join('\n')}
361-
` : ''}
359+
#### 🆕 New Tests (${testComparison.new.length})
360+
\`\`\`
361+
${testComparison.new.length > 0 ? testComparison.new.join('\n') : 'None'}
362+
\`\`\`
362363
363-
${testComparison.skipped.length > 0 ? `
364-
#### ⏭️ Newly Skipped Tests:
365-
${testComparison.skipped.map(test => `- ${test}`).join('\n')}
366-
` : ''}
364+
#### ⏭️ Skipped Tests (${testComparison.skipped.length})
365+
\`\`\`
366+
${testComparison.skipped.length > 0 ? testComparison.skipped.join('\n') : 'None'}
367+
\`\`\`
367368
368-
${testComparison.deleted.length > 0 ? `
369-
#### 🗑️ Deleted Tests:
370-
${testComparison.deleted.map(test => `- ${test}`).join('\n')}
371-
` : ''}
372-
373-
${testComparison.new.length === 0 && testComparison.skipped.length === 0 && testComparison.deleted.length === 0 ?
374-
'✅ No test changes detected' : ''}
369+
#### 🗑️ Deleted Tests (${testComparison.deleted.length})
370+
\`\`\`
371+
${testComparison.deleted.length > 0 ? testComparison.deleted.join('\n') : 'None'}
372+
\`\`\`
375373
</details>
376374
377375
### Bundle Size: ${bundleStatus}

0 commit comments

Comments
 (0)