Skip to content

Commit

Permalink
add homepage test: show more records (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaoVA authored Oct 9, 2024
1 parent 560a153 commit 32f13e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion end2end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "ISC",
"description": "",
"devDependencies": {
"@playwright/test": "^1.46.0",
"@playwright/test": "^1.47.2",
"@types/node": "^22.1.0"
}
}
13 changes: 13 additions & 0 deletions end2end/tests/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,16 @@ test('table header background color is inverted when scrolled down', async ({ pa
const screenshot = await page.screenshot();
await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });
});

test('show more records', async ({ page }, testInfo) => {
await page.goto('https://host.docker.internal/Test_Request_Portal/');

// Wait for async load
await expect(page.locator('#searchContainer')).not.toContainText('Searching for records');

await expect(page.getByRole('link', { name: '5', exact: true })).not.toBeVisible(); // arbitrary record that would be on the bottom of the full list
await page.getByRole('button', { name: 'Show more records' }).click();
await expect(page.getByRole('button', { name: 'Show more records' })).not.toBeVisible();
await page.keyboard.press('End');
await expect(page.getByRole('link', { name: '5', exact: true })).toBeVisible();;
});

0 comments on commit 32f13e0

Please sign in to comment.