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..3ac1fa728a 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,44 @@ spec: ); }); + test("Bulk import plugin page", async () => { + await uiHelper.openSidebar("Bulk import"); + await uiHelper.verifyHeading("Bulk import"); + await expect(page.getByText("Import to Red Hat Developer")).toHaveAttribute( + "aria-expanded", + "true", + ); + await page + .getByRole("button", { name: "Import to Red Hat Developer" }) + .click(); + await expect(page.getByText("Import to Red Hat Developer")).toHaveAttribute( + "aria-expanded", + "false", + ); + await expect( + page.getByText("Source control tool", { exact: true }), + ).toBeVisible(); + await page.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 () => {