Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Oct 3, 2023
1 parent 4717d0c commit f0ec71a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion report-viewer/tests/e2e/Comparison.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ test('Test comparison table and comparsion view', async ({ page }) => {

await uploadFile('result_small_cluster.zip', page)

const comparisonContainer = page.getByText(
'Top Comparisons: Type in the name of a submission to only show comparisons that contain this submission. Fully written out names get unhidden.Hide AllSort By'
)

// check for elements in average similarity table
const comparisonTableAverageSorted = await page.getByText('Cluster1').textContent()
expect(comparisonTableAverageSorted).toContain('1CA')
expect(comparisonTableAverageSorted).toContain('2DC')

await page.getByText('Maximum Similarity').click()
await comparisonContainer.getByText('Maximum Similarity', { exact: true }).click()
// check for elements in maximum similarity table
const comparisonTableMaxSorted = await page.getByText('Cluster1').textContent()
expect(comparisonTableMaxSorted).toContain('1CA')
Expand Down
2 changes: 1 addition & 1 deletion report-viewer/tests/e2e/Distribution.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('Test all distribution combinations', async ({ page }) => {
async function compareDistributionDiagramm(page: Page, options: string[]) {
const distributionDiagrammContainer = page.getByText('Distribution of Comparisons:Options:')
for (const option of options) {
await distributionDiagrammContainer.getByText(option).click()
await distributionDiagrammContainer.getByText(option).first().click()
}
// This timeout is so that the screenshot is taken after the animation is finished
await page.waitForTimeout(3000)
Expand Down
2 changes: 1 addition & 1 deletion report-viewer/tests/e2e/Information.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test('Test information page', async ({ page }) => {
expect(bodyOverview).toContain('Min Match Length: 9')

// go to information page
await page.getByText('More').click()
await page.getByText('More', { exact: true }).click()
await page.waitForURL('/info')

// check displayed run options on information page
Expand Down

0 comments on commit f0ec71a

Please sign in to comment.