Skip to content

Commit

Permalink
test(e2e): Update test to select other options from Items Per Page (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
moduli authored Jul 31, 2024
1 parent 6e7eded commit fc5121c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ui/admin/tests/e2e/tests/pagination.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,34 @@ test('Search and Pagination (Targets) @ce @ent @aws @docker', async ({
await expect(
page.getByRole('link', { name: targets[targets.length - 2].name }),
).toBeVisible();

// Use the "Items per page" options to show 50 items per page.
await page
.getByRole('combobox', { name: 'Items per page' })
.selectOption('50');
await expect(
page.getByRole('link', { name: targets[0].name }),
).toBeVisible();
await expect(
page.getByRole('link', { name: targets[targets.length - 1].name }),
).toBeVisible();
await expect(
page.getByRole('link', { name: targets[targets.length - 2].name }),
).toBeVisible();

// Use the "Items per page" options to show 10 items per page.
await page
.getByRole('combobox', { name: 'Items per page' })
.selectOption('10');
await expect(
page.getByRole('link', { name: targets[0].name }),
).toBeHidden();
await expect(
page.getByRole('link', { name: targets[targets.length - 2].name }),
).toBeVisible();
await expect(
page.getByRole('link', { name: targets[targets.length - 1].name }),
).toBeVisible();
} finally {
if (org.id) {
org = await request.delete(`/v1/scopes/${org.id}`);
Expand Down

0 comments on commit fc5121c

Please sign in to comment.