Skip to content

Commit e5877a9

Browse files
Merge pull request #113 from ctrf-io/feat/remove-table
feat: improve test rate tables with conditional rendering and sorting
2 parents ab9d116 + baa3efc commit e5877a9

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

dist/community-reports/cobra-report.hbs

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reports/fail-rate-table.hbs

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reports/flaky-rate-table.hbs

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/reports/fail-rate-table.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#### Overall Fail Rate: {{formatRate ctrf.summary.extra.failRate 2}}%
22

3+
{{#if (sortTestsByFailRate ctrf.tests)}}
34
| Test 📝 | Runs 🎯 | Pass ✅ | Fail ❌ | Fail Rate % |
45
| --- | --- | --- | --- | --- |
56
{{#each (sortTestsByFailRate ctrf.tests)}}
67
| {{name}} | {{extra.finalResults}} | {{extra.passedCount}} | {{extra.finalFailures}} | {{formatRate extra.failRate 2}} |
78
{{/each}}
9+
{{else}}
10+
No failed tests to show✨
11+
{{/if}}
812

913
<sub><i>Measured over {{ctrf.summary.extra.reportsUsed}} runs.</i></sub>

src/reports/flaky-rate-table.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#### Overall Flaky Rate: {{formatRate ctrf.summary.extra.flakyRate 2}}%
22

3+
{{#if (sortTestsByFlakyRate ctrf.tests)}}
34
| Test 📝 | Attempts 🎯 | Pass ✅ | Fail ❌ | Flaky Rate % 🍂 |
45
| --- | --- | --- | --- | --- |
56
{{#each (sortTestsByFlakyRate ctrf.tests)}}
67
| {{name}} | {{extra.totalAttempts}} | {{extra.passedCount}} | {{extra.failedCount}} | {{formatRate extra.flakyRate 2}} |
78
{{/each}}
9+
{{else}}
10+
No flaky tests to show✨
11+
{{/if}}
812

913
<sub><i>Measured over {{ctrf.summary.extra.reportsUsed}} runs.</i></sub>

0 commit comments

Comments
 (0)