From 364a0a556a1223754be8004fb76d7cbace8cf3c3 Mon Sep 17 00:00:00 2001 From: "Hugo P.Brito" Date: Wed, 15 Jul 2026 13:57:58 +0100 Subject: [PATCH] test(ui): update OCI provider E2E credentials --- ui/tests/providers/providers-page.ts | 8 -------- ui/tests/providers/providers.md | 12 ++++++------ ui/tests/providers/providers.spec.ts | 8 ++------ 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/ui/tests/providers/providers-page.ts b/ui/tests/providers/providers-page.ts index f618c59d97..59103220c0 100644 --- a/ui/tests/providers/providers-page.ts +++ b/ui/tests/providers/providers-page.ts @@ -224,7 +224,6 @@ export interface OCIProviderCredential { userId?: string; fingerprint?: string; keyContent?: string; - region?: string; } // AlibabaCloud credential options @@ -366,7 +365,6 @@ export class ProvidersPage extends BasePage { readonly ociUserIdInput: Locator; readonly ociFingerprintInput: Locator; readonly ociKeyContentInput: Locator; - readonly ociRegionInput: Locator; // AlibabaCloud provider form elements readonly alibabacloudAccountIdInput: Locator; @@ -510,7 +508,6 @@ export class ProvidersPage extends BasePage { this.ociKeyContentInput = page.getByRole("textbox", { name: /Private Key Content/i, }); - this.ociRegionInput = page.getByRole("textbox", { name: /Region/i }); // AlibabaCloud provider form inputs this.alibabacloudAccountIdInput = page.getByRole("textbox", { @@ -1300,9 +1297,6 @@ export class ProvidersPage extends BasePage { if (credentials.keyContent) { await this.ociKeyContentInput.fill(credentials.keyContent); } - if (credentials.region) { - await this.ociRegionInput.fill(credentials.region); - } } async verifyOCICredentialsPageLoaded(): Promise { @@ -1313,7 +1307,6 @@ export class ProvidersPage extends BasePage { await expect(this.ociUserIdInput).toBeVisible(); await expect(this.ociFingerprintInput).toBeVisible(); await expect(this.ociKeyContentInput).toBeVisible(); - await expect(this.ociRegionInput).toBeVisible(); } async verifyOCIUpdateCredentialsPageLoaded(): Promise { @@ -1324,7 +1317,6 @@ export class ProvidersPage extends BasePage { await expect(this.ociUserIdInput).toBeVisible(); await expect(this.ociFingerprintInput).toBeVisible(); await expect(this.ociKeyContentInput).toBeVisible(); - await expect(this.ociRegionInput).toBeVisible(); } async selectAlibabaCloudProvider(): Promise { diff --git a/ui/tests/providers/providers.md b/ui/tests/providers/providers.md index e8139b2b3d..a2914c2cde 100644 --- a/ui/tests/providers/providers.md +++ b/ui/tests/providers/providers.md @@ -667,7 +667,7 @@ **Preconditions:** - Admin user authentication required (admin.auth.setup setup) -- Environment variables configured: E2E_OCI_TENANCY_ID, E2E_OCI_USER_ID, E2E_OCI_FINGERPRINT, E2E_OCI_KEY_CONTENT, E2E_OCI_REGION +- Environment variables configured: E2E_OCI_TENANCY_ID, E2E_OCI_USER_ID, E2E_OCI_FINGERPRINT, E2E_OCI_KEY_CONTENT - Remove any existing provider with the same Tenancy ID before starting the test - This test must be run serially and never in parallel with other tests, as it requires the Tenancy ID not to be already registered beforehand. @@ -678,7 +678,7 @@ 3. Select OCI provider type 4. Fill provider details (tenancy ID and alias) 5. Verify OCI credentials page is loaded -6. Fill OCI credentials (user ID, fingerprint, key content, region) +6. Fill OCI credentials (user ID, fingerprint, key content) 7. Confirm provider connection without launching a scan 8. Verify return to Providers page 9. Verify provider exists in Providers table @@ -696,7 +696,7 @@ - Connect account page displays OCI option - Provider details form accepts tenancy ID and alias - OCI credentials page loads -- Credentials form accepts all required fields (user ID, fingerprint, key content, region) +- Credentials form accepts all required fields (user ID, fingerprint, key content) - Launch step appears - Successful return to Providers page after closing the launch step - Provider exists in Providers table (verified by tenancy ID) @@ -726,7 +726,7 @@ **Preconditions:** - Admin user authentication required (admin.auth.setup setup) -- Environment variables configured: E2E_OCI_TENANCY_ID, E2E_OCI_USER_ID, E2E_OCI_FINGERPRINT, E2E_OCI_KEY_CONTENT, E2E_OCI_REGION +- Environment variables configured: E2E_OCI_TENANCY_ID, E2E_OCI_USER_ID, E2E_OCI_FINGERPRINT, E2E_OCI_KEY_CONTENT - An OCI provider with the specified Tenancy ID must already exist (run PROVIDER-E2E-012 first) - This test must be run serially and never in parallel with other tests @@ -738,7 +738,7 @@ 4. Click "Update Credentials" option 5. Verify update credentials page is loaded 6. Verify OCI credentials form fields are visible (confirms providerUid is loaded) -7. Fill OCI credentials (user ID, fingerprint, key content, region) +7. Fill OCI credentials (user ID, fingerprint, key content) 8. Click Next to submit 9. Verify successful navigation to test connection page @@ -756,7 +756,7 @@ - OCI provider row is visible in providers table - Row actions dropdown opens and displays "Update Credentials" option - Update credentials page URL contains correct parameters -- OCI credentials form displays all fields (tenancy ID, user ID, fingerprint, key content, region) +- OCI credentials form displays all required fields (tenancy ID, user ID, fingerprint, key content) - Form submission succeeds (no silent failures due to missing provider UID) - Successful redirect to test connection page diff --git a/ui/tests/providers/providers.spec.ts b/ui/tests/providers/providers.spec.ts index 4dc8f010ed..b461808c65 100644 --- a/ui/tests/providers/providers.spec.ts +++ b/ui/tests/providers/providers.spec.ts @@ -1029,12 +1029,11 @@ test.describe("Add Provider", () => { const userId = process.env.E2E_OCI_USER_ID ?? ""; const fingerprint = process.env.E2E_OCI_FINGERPRINT ?? ""; const keyContent = process.env.E2E_OCI_KEY_CONTENT ?? ""; - const region = process.env.E2E_OCI_REGION ?? ""; // Setup before each test test.beforeEach(async ({ page }) => { test.skip( - !tenancyId || !userId || !fingerprint || !keyContent || !region, + !tenancyId || !userId || !fingerprint || !keyContent, "OCI E2E env vars are not set", ); providersPage = new ProvidersPage(page); @@ -1071,7 +1070,6 @@ test.describe("Add Provider", () => { userId: userId, fingerprint: fingerprint, keyContent: keyContent, - region: region, }; // Navigate to providers page @@ -1516,12 +1514,11 @@ test.describe("Update Provider Credentials", () => { const userId = process.env.E2E_OCI_USER_ID ?? ""; const fingerprint = process.env.E2E_OCI_FINGERPRINT ?? ""; const keyContent = process.env.E2E_OCI_KEY_CONTENT ?? ""; - const region = process.env.E2E_OCI_REGION ?? ""; // Setup before each test test.beforeEach(async ({ page }) => { test.skip( - !tenancyId || !userId || !fingerprint || !keyContent || !region, + !tenancyId || !userId || !fingerprint || !keyContent, "OCI E2E env vars are not set", ); providersPage = new ProvidersPage(page); @@ -1543,7 +1540,6 @@ test.describe("Update Provider Credentials", () => { userId: userId, fingerprint: fingerprint, keyContent: keyContent, - region: region, }; // Navigate to providers page