diff --git a/packages/elements/src/components/metrics-table/metrics-table.component.ts b/packages/elements/src/components/metrics-table/metrics-table.component.ts index 818281bac..134dedf02 100644 --- a/packages/elements/src/components/metrics-table/metrics-table.component.ts +++ b/packages/elements/src/components/metrics-table/metrics-table.component.ts @@ -23,6 +23,7 @@ export interface Column { width?: TableWidth; category: ColumnCategory; isBold?: true; + group?: string; } @customElement('mte-metrics-table') @@ -67,9 +68,11 @@ export class MutationTestReportTestMetricsTable extends RealTime } private renderTableHeadRow() { + const nonMutationScoreColumns = this.columns.filter((column) => column.group !== 'Mutation score'); + const mutationScoreColumns = this.columns.filter((column) => column.group === 'Mutation score'); return html` - +
File / Directory extends RealTime >
+ ${mutationScoreColumns.length>0 ? html`Mutation Score`:``} ${repeat( - this.columns, + nonMutationScoreColumns, + (column) => column.key, + (column) => this.renderTableHead(column), + )} + + + ${repeat( + mutationScoreColumns, (column) => column.key, (column) => this.renderTableHead(column), )} @@ -95,10 +106,10 @@ export class MutationTestReportTestMetricsTable extends RealTime const header = column.tooltip ? html`${column.label}` : html`${column.label}`; - if (column.category === 'percentage') { - return html` ${header} `; + if (column.group) { + return html` ${header} `; } - return html` + return html`
${header}
`; } diff --git a/packages/elements/src/components/mutant-view/mutant-view.ts b/packages/elements/src/components/mutant-view/mutant-view.ts index 174e84c57..083e6ba74 100644 --- a/packages/elements/src/components/mutant-view/mutant-view.ts +++ b/packages/elements/src/components/mutant-view/mutant-view.ts @@ -65,9 +65,17 @@ export class MutationTestReportMutantViewComponent extends RealTimeElement { const COLUMNS: Column[] = [ { key: 'mutationScore', - label: 'Mutation score', + label: 'Of total', tooltip: 'The percentage of mutants that were detected. The higher, the better!', category: 'percentage', + group: 'Mutation score' + }, + { + key: 'mutationScoreBasedOnCoveredCode', + label: 'Of covered', + tooltip: 'Mutation score based on only the code covered by tests', + category: 'percentage', + group: 'Mutation score' }, { key: 'killed', @@ -98,7 +106,7 @@ const COLUMNS: Column[] = [ label: 'Ignored', tooltip: "These mutants weren't tested because they are ignored. Either by user action, or for another reason.", category: 'number', - }, + }, { key: 'runtimeErrors', label: 'Runtime errors', diff --git a/packages/elements/test/integration/directoryReport.it.spec.ts b/packages/elements/test/integration/directoryReport.it.spec.ts index 151cc7504..bb596d7d4 100644 --- a/packages/elements/test/integration/directoryReport.it.spec.ts +++ b/packages/elements/test/integration/directoryReport.it.spec.ts @@ -24,11 +24,13 @@ test.describe('Directory report page', () => { await Promise.all([ row.progressBar().expectPercentage('8.70'), expect(row.mutationScore()).toHaveText('8.70'), + row.testStrengthProgressBar().expectPercentage('66.67'), + expect(row.mutationScoreBasedOnCoveredCode()).toHaveText('66.67'), expect(row.killed()).toHaveText('2'), expect(row.survived()).toHaveText('1'), expect(row.timeout()).toHaveText('0'), expect(row.noCoverage()).toHaveText('20'), - expect(row.ignored()).toHaveText('0'), + expect(row.ignored()).toHaveText('0'), expect(row.runtimeErrors()).toHaveText('0'), expect(row.compileErrors()).toHaveText('3'), expect(row.totalDetected()).toHaveText('2'), diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-linux.png index 18ec12356..aabb7ee99 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-win32.png index 207a67980..bec249e22 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-linux.png index b3fb919b0..aa53bb941 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-win32.png index e1de80386..1b4be09d1 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-linux.png index 068e32a92..4af752fc2 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-win32.png index d1da088ba..13a3fe619 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-linux.png index bea003a99..9da8860a4 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-win32.png index 8418cea0b..8e4575db1 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-look-as-expected-in-dark-mode-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-linux.png index f7adfe3c4..dba6263dd 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-win32.png index 9ca668e57..4d0b55e97 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-should-show-the-statusReason-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png index de3bcb56a..5b3e63f5d 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png index f1c5aea3b..15041b3e6 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-linux.png index a05485723..a637e2c8b 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-win32.png index e7a810745..8f8a1dd09 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-whe-a1d5a--toggled-should-look-as-expected-in-dark-mode-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png index 6893377fd..8518f57d6 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png index 16549a783..f936608e4 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-linux.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-linux.png index 10ab04ca9..f33070a2b 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-linux.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-win32.png b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-win32.png index ad89504e4..a4aa9fdd9 100644 Binary files a/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-win32.png and b/packages/elements/test/integration/drawer-mutant.it.spec.ts-snapshots/Drawer-mutant-view-when-a-mutant-is-opened-when-read-more-is-toggled-should-look-as-expected-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-linux.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-linux.png index d4ff8ffb1..fdd76a0e0 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-linux.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-win32.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-win32.png index 8e6a5a09a..cfbada380 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-win32.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-linux.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-linux.png index 3d0ea99b8..28e93dd4f 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-linux.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-win32.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-win32.png index 29449d673..f3e427c28 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-win32.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-should-look-as-expected-in-dark-mode-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png index f97ee3b71..66000b942 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png index 9302abd67..390f309da 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png index 27b03efb6..9abffe9d7 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png index ce7fe4dc3..499755d98 100644 Binary files a/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png and b/packages/elements/test/integration/drawer-test.it.spec.ts-snapshots/Drawer-test-view-when-read-more-is-toggled-should-look-as-expected-in-dark-mode-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-linux.png b/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-linux.png index 57168f372..e99114599 100644 Binary files a/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-linux.png and b/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-win32.png b/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-win32.png index 0c869ad4c..099d5e635 100644 Binary files a/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-win32.png and b/packages/elements/test/integration/fileReport.it.spec.ts-snapshots/File-report-install-local-example-Options-ts--6b2d4-ant-when-scrolled-up-should-look-as-expected-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/po/ResultTableRow.po.ts b/packages/elements/test/integration/po/ResultTableRow.po.ts index c5d210f5a..d061154fc 100644 --- a/packages/elements/test/integration/po/ResultTableRow.po.ts +++ b/packages/elements/test/integration/po/ResultTableRow.po.ts @@ -7,14 +7,16 @@ export class ResultTableRow extends PageObject { public name = () => this.nameTableElement().innerText(); public progressBar = () => new ProgressBar(this.$('td:nth-child(2)>div.rounded-full'), this.browser); public mutationScore = () => this.$('td:nth-child(3)'); - public killed = () => this.$('td:nth-child(4)'); - public survived = () => this.$('td:nth-child(5)'); - public timeout = () => this.$('td:nth-child(6)'); - public noCoverage = () => this.$('td:nth-child(7)'); - public ignored = () => this.$('td:nth-child(8)'); - public runtimeErrors = () => this.$('td:nth-child(9)'); - public compileErrors = () => this.$('td:nth-child(10)'); - public totalDetected = () => this.$('td:nth-child(11)'); - public totalUndetected = () => this.$('td:nth-child(12)'); - public totalMutants = () => this.$('td:nth-child(13)'); + public testStrengthProgressBar = () => new ProgressBar(this.$('td:nth-child(4)>div.rounded-full'), this.browser); + public mutationScoreBasedOnCoveredCode = () => this.$('td:nth-child(5)'); + public killed = () => this.$('td:nth-child(6)'); + public survived = () => this.$('td:nth-child(7)'); + public timeout = () => this.$('td:nth-child(8)'); + public noCoverage = () => this.$('td:nth-child(9)'); + public ignored = () => this.$('td:nth-child(10)'); + public runtimeErrors = () => this.$('td:nth-child(11)'); + public compileErrors = () => this.$('td:nth-child(12)'); + public totalDetected = () => this.$('td:nth-child(13)'); + public totalUndetected = () => this.$('td:nth-child(14)'); + public totalMutants = () => this.$('td:nth-child(15)'); } diff --git a/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-linux.png b/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-linux.png index e067225c4..75c13c4a0 100644 Binary files a/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-linux.png and b/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-win32.png b/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-win32.png index 1773cc75a..3ab60de4c 100644 Binary files a/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-win32.png and b/packages/elements/test/integration/test-view.it.spec.ts-snapshots/Test-view-test-file-with-code-and-test-locatio-3c4f6-ating-previous-test-should-look-as-expected-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-linux.png index 521a989c1..747c4055d 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-win32.png index dcfedc952..a5bf24ade 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-linux.png index c78e9ce71..6976276f2 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-win32.png index 7c1dc81a7..7aca5f236 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-should-match-the-dark-theme-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-linux.png index 219a815fe..a6165af7f 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-win32.png index e11b862d9..e66623bf1 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-linux.png index 8bebc89b9..a4880fd7a 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-win32.png index f60a08025..f13af8b21 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-dark-theme-when-opening-a-code-file-should-match-the-dark-theme-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-linux.png index 35de68891..2a049a167 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-win32.png index 238303364..1e7add416 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-linux.png index d82c00042..d353f8fca 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-win32.png index e0a897907..3e8940277 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-should-match-the-light-theme-1-firefox-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-linux.png index c56bd74a6..cc4556164 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-win32.png index 7ba372705..12bb4d08e 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-chromium-win32.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-linux.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-linux.png index 118274302..8362b8571 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-linux.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-linux.png differ diff --git a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-win32.png b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-win32.png index 9636df157..0887a4752 100644 Binary files a/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-win32.png and b/packages/elements/test/integration/theming.it.spec.ts-snapshots/Theming-light-theme-when-opening-a-code-file-should-match-the-light-theme-1-firefox-win32.png differ diff --git a/packages/elements/test/unit/components/mutant-view.component.spec.ts b/packages/elements/test/unit/components/mutant-view.component.spec.ts index 280eea109..cd74c1fa4 100644 --- a/packages/elements/test/unit/components/mutant-view.component.spec.ts +++ b/packages/elements/test/unit/components/mutant-view.component.spec.ts @@ -29,9 +29,17 @@ describe(MutationTestReportMutantViewComponent.name, () => { const expectedColumns: Column[] = [ { key: 'mutationScore', - label: 'Mutation score', + label: 'Of total', tooltip: 'The percentage of mutants that were detected. The higher, the better!', category: 'percentage', + group: 'Mutation score' + }, + { + key: 'mutationScoreBasedOnCoveredCode', + label: 'Of covered', + tooltip: 'Mutation score based on only the code covered by tests', + category: 'percentage', + group: 'Mutation score' }, { key: 'killed', diff --git a/packages/elements/test/unit/components/totals.component.spec.ts b/packages/elements/test/unit/components/totals.component.spec.ts index 27faef141..35bee1ce2 100644 --- a/packages/elements/test/unit/components/totals.component.spec.ts +++ b/packages/elements/test/unit/components/totals.component.spec.ts @@ -10,7 +10,20 @@ describe(MutationTestReportTestMetricsTable.name, () => { beforeEach(async () => { sut = new CustomElementFixture('mte-metrics-table'); sut.element.columns = [ - { key: 'mutationScore', label: 'Mutation score', category: 'percentage' }, + { + key: 'mutationScore', + label: 'Total', + tooltip: 'The percentage of mutants that were detected. The higher, the better!', + category: 'percentage', + group: 'Mutation score' + }, + { + key: 'mutationScoreBasedOnCoveredCode', + label: 'Of covered', + tooltip: 'Mutation score based on only the code covered by tests', + category: 'percentage', + group: 'Mutation score' + }, { key: 'killed', label: '# Killed', category: 'number' }, { key: 'survived', label: '# Survived', category: 'number' }, { key: 'timeout', label: '# Timeout', category: 'number' }, @@ -40,8 +53,8 @@ describe(MutationTestReportTestMetricsTable.name, () => { await sut.whenStable(); const table = sut.$('table'); expect(table).ok; - expect(table.querySelectorAll('thead th')).lengthOf(12); - expect(table.querySelectorAll('tbody th, tbody td')).lengthOf(13); + expect(table.querySelectorAll('thead th')).lengthOf(14); + expect(table.querySelectorAll('tbody th, tbody td')).lengthOf(15); }); it('should show a table with a 3 rows for a directory result with 2 directories and one file', async () => {