diff --git a/ui/admin/tests/e2e/helpers/boundary-ui.js b/ui/admin/tests/e2e/helpers/boundary-ui.js index 64fd9f1b55..0ec7b54f0f 100644 --- a/ui/admin/tests/e2e/helpers/boundary-ui.js +++ b/ui/admin/tests/e2e/helpers/boundary-ui.js @@ -46,7 +46,7 @@ exports.createNewProject = async (page) => { .getByRole('navigation', { name: 'General' }) .getByRole('link', { name: 'Projects' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name').fill(projectName); await page.getByLabel('Description').fill('This is an automated test'); await page.getByRole('button', { name: 'Save' }).click(); @@ -74,7 +74,7 @@ exports.createNewHostCatalog = async (page) => { .getByRole('navigation', { name: 'Resources' }) .getByRole('link', { name: 'Host Catalogs' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name').fill(hostCatalogName); await page.getByLabel('Description').fill('This is an automated test'); await page.getByRole('button', { name: 'Save' }).click(); @@ -149,7 +149,7 @@ exports.createNewTarget = async (page) => { .getByRole('navigation', { name: 'Resources' }) .getByRole('link', { name: 'Targets' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name').fill(targetName); await page.getByLabel('Description').fill('This is an automated test'); await page.getByLabel('Default Port').fill(process.env.E2E_TARGET_PORT); @@ -178,7 +178,7 @@ exports.createNewTargetWithAddress = async (page) => { .getByRole('navigation', { name: 'Resources' }) .getByRole('link', { name: 'Targets' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name').fill(targetName); await page.getByLabel('Description').fill('This is an automated test'); await page.getByLabel('Target Address').fill(process.env.E2E_TARGET_ADDRESS); @@ -298,7 +298,7 @@ exports.createNewPasswordAuthMethod = async (page, authMethodName) => { .getByRole('navigation', { name: 'IAM' }) .getByRole('link', { name: 'Auth Methods' }) .click(); - await page.getByTitle('New', { exact: true }).click(); + await page.getByRole('button', { name: 'New' }).click(); await page.getByText('Password', { exact: true }).click(); await page.getByLabel('Name').fill(authMethodName); await page.getByRole('button', { name: 'Save' }).click(); diff --git a/ui/admin/tests/e2e/tests/credential-store-static.spec.js b/ui/admin/tests/e2e/tests/credential-store-static.spec.js index d4251635db..7f86f324da 100644 --- a/ui/admin/tests/e2e/tests/credential-store-static.spec.js +++ b/ui/admin/tests/e2e/tests/credential-store-static.spec.js @@ -57,7 +57,7 @@ test.beforeEach(async ({ page }) => { .getByRole('navigation', { name: 'Resources' }) .getByRole('link', { name: 'Credential Stores' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name', { exact: true }).fill(credentialStoreName); await page.getByLabel('Description').fill('This is an automated test'); await page.getByRole('group', { name: 'Type' }).getByLabel('Static').click(); diff --git a/ui/admin/tests/e2e/tests/credential-store-vault.spec.js b/ui/admin/tests/e2e/tests/credential-store-vault.spec.js index 10595ecd0a..9b25a290b3 100644 --- a/ui/admin/tests/e2e/tests/credential-store-vault.spec.js +++ b/ui/admin/tests/e2e/tests/credential-store-vault.spec.js @@ -93,7 +93,7 @@ test('Vault Credential Store (User & Key Pair)', async ({ page }) => { .getByRole('navigation', { name: 'Resources' }) .getByRole('link', { name: 'Credential Stores' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name', { exact: true }).fill(credentialStoreName); await page.getByLabel('Description').fill('This is an automated test'); await page.getByRole('group', { name: 'Type' }).getByLabel('Vault').click(); diff --git a/ui/admin/tests/e2e/tests/dynamic-host-catalog.spec.js b/ui/admin/tests/e2e/tests/dynamic-host-catalog.spec.js index 47b0cfc09d..170a39816b 100644 --- a/ui/admin/tests/e2e/tests/dynamic-host-catalog.spec.js +++ b/ui/admin/tests/e2e/tests/dynamic-host-catalog.spec.js @@ -36,7 +36,7 @@ test.describe('AWS', async () => { .getByRole('navigation', { name: 'Resources' }) .getByRole('link', { name: 'Host Catalogs' }) .click(); - await page.getByRole('link', { name: 'New' }).click(); + await page.getByRole('link', { name: 'New', exact: true }).click(); await page.getByLabel('Name').fill(hostCatalogName); await page.getByLabel('Description').fill('This is an automated test'); await page diff --git a/ui/admin/tests/e2e/tests/target.spec.js b/ui/admin/tests/e2e/tests/target.spec.js index 725f57ad8a..9e03db5a44 100644 --- a/ui/admin/tests/e2e/tests/target.spec.js +++ b/ui/admin/tests/e2e/tests/target.spec.js @@ -139,7 +139,7 @@ test('Verify TCP target is updated', async ({ page }) => { await page.getByLabel('Maximum Connections').fill('10'); await page.getByLabel('Egress worker filter').click(); await page - .getByRole('textbox', { name: 'Filter', exact: true }) + .getByRole('textbox', { name: /^Filter/, exact: true }) .fill('"dev" in "/tags/type"'); await page.getByRole('button', { name: 'Save' }).click();