diff --git a/end2end/package.json b/end2end/package.json index e8f45dbc..53f07628 100644 --- a/end2end/package.json +++ b/end2end/package.json @@ -8,7 +8,7 @@ "license": "ISC", "description": "", "devDependencies": { - "@playwright/test": "^1.46.0", + "@playwright/test": "^1.47.2", "@types/node": "^22.1.0" } } diff --git a/end2end/tests/homepage.spec.ts b/end2end/tests/homepage.spec.ts index df7721d7..644510d9 100644 --- a/end2end/tests/homepage.spec.ts +++ b/end2end/tests/homepage.spec.ts @@ -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();; +});