test(e2e): Address some Admin UI test flakiness (#2934)

* fix(e2e): Address flakiness during screen navigation

* fix(e2e): Fix function call

* fix(e2e): Address flakiness in connection

* fix(e2e): Make locator explicit to avoid conflict when an ID has `ok`

* fix(e2e): Fix URL now that project page defaults to showing targets
This commit is contained in:
Michael Li authored and GitHub committed 2025-09-03 11:28:33 -04:00
1 parent a26074a3b8
commit 1bafbe1ad2
8 files changed
+65 -53

No files matched your search

+11 -1
View File
@@ -228,9 +228,19 @@ test.describe('Aliases', () => {
targetName,
);
await page
.getByRole('link', { name: `Back to ${orgName}`, exact: true })
.click();
await page.getByRole('link', { name: 'Back to Global' }).click();
await page.getByRole('link', { name: 'Aliases' }).click();
await expect(
page
.getByRole('navigation', { name: 'breadcrumbs' })
.getByText('Aliases'),
).toBeVisible();
alias = 'example.alias.' + nanoid();
const aliasesPage = new AliasesPage(page);
await aliasesPage.createAliasForTarget(alias, targetId, orgName);
await aliasesPage.createAliasForTarget(alias, targetId);
await page.getByRole('link', { name: 'Orgs', exact: true }).click();
await expect(page.getByRole('heading', { name: 'Orgs' })).toBeVisible();
await page.getByRole('link', { name: orgName }).click();