Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e/admin): Updates for 0.19.0 #2665

Merged
merged 4 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions e2e-tests/admin/pages/storage-buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class StorageBucketsPage extends BaseResourcePage {
.getByRole('link', { name: 'Storage Buckets', exact: true })
.click();
await this.page.getByRole('link', { name: 'New Storage Bucket' }).click();
await this.page.getByLabel(new RegExp('Name*')).fill(storageBucketName);
await this.page.getByLabel('Name (Optional)').fill(storageBucketName);
await this.page.getByLabel('Scope').selectOption({ label: scope });
await this.page
.getByRole('group', { name: 'Provider' })
Expand All @@ -42,7 +42,10 @@ export class StorageBucketsPage extends BaseResourcePage {
await this.page.getByLabel('Region').fill(region);
await this.page.getByLabel('Access key ID').fill(accessKeyId);
await this.page.getByLabel('Secret access key').fill(secretAccessKey);
await this.page.getByLabel('Worker filter').fill(workerFilter);
await this.page
.getByLabel('Worker filter')
.locator('textarea')
.fill(workerFilter);
await this.page.getByLabel('Disable credential rotation').click();
await this.page.getByRole('button', { name: 'Save' }).click();
await this.dismissSuccessAlert();
Expand Down Expand Up @@ -80,7 +83,7 @@ export class StorageBucketsPage extends BaseResourcePage {
.getByRole('link', { name: 'Storage Buckets', exact: true })
.click();
await this.page.getByRole('link', { name: 'New Storage Bucket' }).click();
await this.page.getByLabel(new RegExp('Name*')).fill(storageBucketName);
await this.page.getByLabel('Name (Optional)').fill(storageBucketName);
await this.page.getByLabel('Scope').selectOption({ label: scope });
await this.page
.getByRole('group', { name: 'Provider' })
Expand All @@ -91,7 +94,10 @@ export class StorageBucketsPage extends BaseResourcePage {
await this.page.getByLabel('Region').fill(region);
await this.page.getByLabel('Access key ID').fill(accessKeyId);
await this.page.getByLabel('Secret access key').fill(secretAccessKey);
await this.page.getByLabel('Worker filter').fill(workerFilter);
await this.page
.getByLabel('Worker filter')
.locator('textarea')
.fill(workerFilter);
await this.page.getByLabel('Disable credential rotation').click();
await this.page.getByRole('button', { name: 'Save' }).click();
await this.dismissSuccessAlert();
Expand Down
8 changes: 4 additions & 4 deletions e2e-tests/admin/pages/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ export class TargetsPage extends BaseResourcePage {
await this.page
.getByText('Ingress workers')
.locator('..')
.getByRole('link', { name: 'Edit worker filter' })
.getByRole('link', { name: 'Add worker filter' })
.click();
await expect(
this.page
.getByRole('navigation', { name: 'breadcrumbs' })
.getByText('Edit Ingress Worker Filter'),
).toBeVisible();

await this.page.getByRole('textbox').fill(filter);
await this.page.locator('textarea').fill(filter);

await this.page.getByRole('button', { name: 'Save' }).click();
await this.dismissSuccessAlert();
Expand All @@ -328,15 +328,15 @@ export class TargetsPage extends BaseResourcePage {
await this.page
.getByText('Egress workers')
.locator('..')
.getByRole('link', { name: 'Edit worker filter' })
.getByRole('link', { name: 'Add worker filter' })
.click();
await expect(
this.page
.getByRole('navigation', { name: 'breadcrumbs' })
.getByText('Edit Egress Worker Filter'),
).toBeVisible();

await this.page.getByRole('textbox').fill(filter);
await this.page.locator('textarea').fill(filter);

await this.page.getByRole('button', { name: 'Save' }).click();
await this.dismissSuccessAlert();
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/admin/tests/auth-method-ldap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ test('Set up LDAP auth method @ce @ent @docker', async ({
).toBeVisible();

// Change state to active-public
await page.getByTitle('Inactive').click();
await page.getByRole('button', { name: 'Inactive' }).click();
await page.getByText('Public').click();
await expect(
page.getByRole('alert').getByText('Success', { exact: true }),
Expand Down
7 changes: 6 additions & 1 deletion e2e-tests/admin/tests/auth-method-oidc-vault.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test('Set up OIDC auth method @ce @ent @docker @aws', async ({
);

// Change OIDC Auth Method state to active-public
await page.getByTitle('Inactive').click();
await page.getByRole('button', { name: 'Inactive' }).click();
await page.getByText('Public').click();
await expect(
page.getByRole('alert').getByText('Success', { exact: true }),
Expand Down Expand Up @@ -140,6 +140,11 @@ test('Set up OIDC auth method @ce @ent @docker @aws', async ({

// View the OIDC account and verify account attributes
await page.getByRole('link', { name: orgName }).click();
await expect(
page
.getByRole('navigation', { name: 'breadcrumbs' })
.getByText(orgName),
).toBeVisible();
await page
.getByRole('navigation', { name: 'IAM' })
.getByRole('link', { name: 'Auth Methods' })
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/admin/tests/target.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ test('Verify TCP target is updated @ce @aws @docker', async ({
).toBeVisible();
await expect(page.getByText('"dev" in "/tags/type"')).toBeVisible();

await page.getByRole('textbox').click({ force: true });
await page.locator('textarea').click({ force: true });
await page.keyboard.press('Meta+A');
await page.keyboard.press('Backspace');
await page.getByRole('textbox').fill('"prod" in "/tags/type"');
await page.locator('textarea').fill('"prod" in "/tags/type"');
await page.getByRole('button', { name: 'Save' }).click();
const basePage = new BasePage(page);
await basePage.dismissSuccessAlert();
Expand Down
Loading