From 74a43a8992b3af5e3d96fc566fc48be2997a23f9 Mon Sep 17 00:00:00 2001 From: sanketpathak Date: Wed, 21 Jan 2026 17:35:00 +0530 Subject: [PATCH] Update e2e tests in RHDH for bulk import UI changes --- .../config_map/app-config-rhdh-rbac.yaml | 10 +++++ .../e2e/plugins/bulk-import.spec.ts | 41 ++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/.ibm/pipelines/resources/config_map/app-config-rhdh-rbac.yaml b/.ibm/pipelines/resources/config_map/app-config-rhdh-rbac.yaml index f2db6d3033..f714ae3a9a 100644 --- a/.ibm/pipelines/resources/config_map/app-config-rhdh-rbac.yaml +++ b/.ibm/pipelines/resources/config_map/app-config-rhdh-rbac.yaml @@ -111,6 +111,16 @@ catalog: orgs: ["${GITHUB_ORG}", "${GITHUB_ORG_2}"] dynatrace: baseUrl: temp +bulkImport: + instructionsEnabled: true + instructionsDefaultExpanded: true + instructionsSteps: + - id: "step1" + text: "Choose your source control platform" + icon: "kind:component" + - id: "step2" + text: "Browse and select repositories" + icon: "search" argocd: appLocatorMethods: - type: "config" diff --git a/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts b/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts index b9419175ff..17c188abfd 100644 --- a/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts @@ -13,7 +13,7 @@ import { test.describe.serial("Bulk Import plugin", () => { test.skip(() => process.env.JOB_NAME.includes("osd-gcp")); // skipping due to RHIDP-5704 on OSD Env // TODO: https://issues.redhat.com/browse/RHDHBUGS-2116 - test.fixme(() => process.env.JOB_TYPE.includes("presubmit")); // skip on PR checks + // test.fixme(() => process.env.JOB_TYPE.includes("presubmit")); // skip on PR checks test.fixme(() => !process.env.JOB_NAME.includes("ocp")); // run only on OCP jobs to avoid GH rate limit test.describe.configure({ retries: process.env.CI ? 5 : 0 }); @@ -80,6 +80,45 @@ spec: ); }); + test("Bulk import plugin page", async () => { + await uiHelper.openSidebar("Bulk import"); + await uiHelper.verifyHeading("Bulk import"); + await expect( + page.getByRole("button", { name: "Import to Red Hat Developer" }), + ).toHaveAttribute("aria-expanded", "true"); + await page + .getByRole("button", { name: "Import to Red Hat Developer" }) + .click(); + await expect( + page.getByRole("button", { name: "Import to Red Hat Developer" }), + ).toHaveAttribute("aria-expanded", "false"); + await expect( + page.getByText("Source control tool", { exact: true }), + ).toBeVisible(); + await page + .getByLabel("Importing requires approval.") + .getByTestId("HelpOutlineIcon") + .hover(); + await expect( + page.getByRole("tooltip", { name: "Importing requires approval." }), + ).toBeVisible(); + await expect(page.getByRole("radio", { name: "GitHub" })).toBeChecked(); + await page.getByRole("radio", { name: "GitLab" }).check(); + await expect(page.getByRole("radio", { name: "GitLab" })).toBeChecked(); + await page.getByRole("radio", { name: "GitHub" }).check(); + await expect(page.getByRole("article")).toMatchAriaSnapshot(` + - table: + - rowgroup: + - row "select all repositories Name URL Organization Status": + - columnheader "select all repositories Name": + - checkbox "select all repositories" + - text: Name + - columnheader "URL" + - columnheader "Organization" + - columnheader "Status" + `); + }); + // TODO: https://issues.redhat.com/browse/RHDHBUGS-2230 // Select two repos: one with an existing catalog.yaml file and another without it test.fixme("Add a Repository from the Repository Tab and Confirm its Preview", async () => {