Skip to content

Commit

Permalink
test(admin/e2e): Fixes for Admin UI test suite (#1935)
Browse files Browse the repository at this point in the history
* test(admin/e2e): Update locator for worker filter textbox

* test(admin/e2e): Update locator for the New button

* test(admin/e2e): Update locator for New link

* fixup! test(admin/e2e): Update locator for worker filter textbox
  • Loading branch information
moduli authored Oct 2, 2023
1 parent bac3593 commit 958b912
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions ui/admin/tests/e2e/helpers/boundary-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion ui/admin/tests/e2e/tests/credential-store-static.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion ui/admin/tests/e2e/tests/credential-store-vault.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion ui/admin/tests/e2e/tests/dynamic-host-catalog.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ui/admin/tests/e2e/tests/target.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

2 comments on commit 958b912

@vercel
Copy link

@vercel vercel bot commented on 958b912 Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

boundary-ui-desktop – ./ui/desktop

boundary-ui-desktop.vercel.app
boundary-ui-desktop-hashicorp.vercel.app
boundary-ui-desktop-git-main-hashicorp.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 958b912 Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

boundary-ui – ./ui/admin

boundary-ui-git-main-hashicorp.vercel.app
boundary-ui.vercel.app
boundary-ui-hashicorp.vercel.app

Please sign in to comment.