Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
xandervedder authored and renovate[bot] committed May 19, 2023
1 parent a62e21c commit 11ab67b
Showing 1 changed file with 71 additions and 83 deletions.
154 changes: 71 additions & 83 deletions packages/e2e/spec/report-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,95 +43,83 @@ test.describe('Report page', () => {
expect(await app.mutationScore()).toBe(33.33);
});

test.describe(
'and afterwards it is overridden with a score-only report',
async () => {
test.beforeEach(async () => {
await client.uploadReport(
scoreOnlyReport(
'github.com/stryker-mutator-test-organization/hello-org',
'master',
42
)
);
await page.navigate(
'github.com/stryker-mutator-test-organization/hello-org',
'master'
);
});

test('should show the mutation score only', async () => {
await expect(page.warningAlert).toContainText(
'No html report stored for github.com/stryker-mutator-test-organization/hello-org/master'
);
await expect(page.mutationTestReportApp.host).not.toExist();
await expect(page.mutationScore).toContainText('Mutation score: 42');
});
}
);
});

test.describe(
'when multiple reports with module names are updated for one project',
() => {
test.describe('and afterwards it is overridden with a score-only report', async () => {
test.beforeEach(async () => {
await Promise.all([
client.uploadReport(
simpleReportv1(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules',
'one',
[MutantStatus.Killed, MutantStatus.Killed, MutantStatus.Killed]
)
),
client.uploadReport(
simpleReportv1(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules',
'two',
[
MutantStatus.Survived,
MutantStatus.Survived,
MutantStatus.Survived,
]
)
),
client.uploadReport(
simpleReportv1(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules',
'three',
[
MutantStatus.Killed,
MutantStatus.Timeout,
MutantStatus.NoCoverage,
]
)
),
]);
await client.uploadReport(
scoreOnlyReport(
'github.com/stryker-mutator-test-organization/hello-org',
'master',
42
)
);
await page.navigate(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules'
'master'
);
});

test('should show the aggregated report for the project', async () => {
await expect(page.mutationTestReportApp.title).toContainText(
'All files'
test('should show the mutation score only', async () => {
await expect(page.warningAlert).toContainText(
'No html report stored for github.com/stryker-mutator-test-organization/hello-org/master'
);
await expect(page.mutationTestReportApp.title).toContainText(
'hello-org/feat/modules'
);
await expect(page.mutationTestReportApp.title).toContainText(
'Stryker Dashboard'
);
expect(await page.mutationTestReportApp.mutationScore()).toBe(55.56);
expect(await page.mutationTestReportApp.fileNames()).toEqual([
'one/test.js',
'three/test.js',
'two/test.js',
]);
await expect(page.mutationTestReportApp.host).not.toExist();
await expect(page.mutationScore).toContainText('Mutation score: 42');
});
}
);
});
});

test.describe('when multiple reports with module names are updated for one project', () => {
test.beforeEach(async () => {
await Promise.all([
client.uploadReport(
simpleReportv1(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules',
'one',
[MutantStatus.Killed, MutantStatus.Killed, MutantStatus.Killed]
)
),
client.uploadReport(
simpleReportv1(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules',
'two',
[
MutantStatus.Survived,
MutantStatus.Survived,
MutantStatus.Survived,
]
)
),
client.uploadReport(
simpleReportv1(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules',
'three',
[MutantStatus.Killed, MutantStatus.Timeout, MutantStatus.NoCoverage]
)
),
]);
await page.navigate(
'github.com/stryker-mutator-test-organization/hello-org',
'feat/modules'
);
});

test('should show the aggregated report for the project', async () => {
await expect(page.mutationTestReportApp.title).toContainText('All files');
await expect(page.mutationTestReportApp.title).toContainText(
'hello-org/feat/modules'
);
await expect(page.mutationTestReportApp.title).toContainText(
'Stryker Dashboard'
);
expect(await page.mutationTestReportApp.mutationScore()).toBe(55.56);
expect(await page.mutationTestReportApp.fileNames()).toEqual([
'one/test.js',
'three/test.js',
'two/test.js',
]);
});
});
});

0 comments on commit 11ab67b

Please sign in to comment.