diff --git a/.ibm/pipelines/openshift-ci-tests.sh b/.ibm/pipelines/openshift-ci-tests.sh index 056b0cca3d..53c3cc447c 100755 --- a/.ibm/pipelines/openshift-ci-tests.sh +++ b/.ibm/pipelines/openshift-ci-tests.sh @@ -290,7 +290,8 @@ run_tests() { cp -a "/tmp/${LOGFILE}.html" "${ARTIFACT_DIR}/${project}" cp -a /tmp/backstage-showcase/e2e-tests/playwright-report/* "${ARTIFACT_DIR}/${project}" - droute_send "${release_name}" "${project}" + # TODO Re-enable `droute` once outage is resolved + # droute_send "${release_name}" "${project}" echo "${project} RESULT: ${RESULT}" if [ "${RESULT}" -ne 0 ]; then diff --git a/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts b/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts index 5f88a94217..849b0858ca 100644 --- a/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts +++ b/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts @@ -6,7 +6,9 @@ import { APIHelper } from "../utils/APIHelper"; import { githubAPIEndpoints } from "../utils/APIEndpoints"; let page: Page; -test.describe.serial("Link Scaffolded Templates to Catalog Items", () => { + +// TODO: replace skip with serial +test.describe.skip("Link Scaffolded Templates to Catalog Items", () => { let uiHelper: UIhelper; let common: Common; let catalogImport: CatalogImport; diff --git a/e2e-tests/playwright/e2e/github-happy-path.spec.ts b/e2e-tests/playwright/e2e/github-happy-path.spec.ts index 0f9a1ebbdc..46c509e000 100644 --- a/e2e-tests/playwright/e2e/github-happy-path.spec.ts +++ b/e2e-tests/playwright/e2e/github-happy-path.spec.ts @@ -9,7 +9,9 @@ import { import { templates } from "../support/testData/templates"; let page: Page; -test.describe.serial("GitHub Happy path", () => { + +// TODO: replace skip with serial +test.describe.skip("GitHub Happy path", () => { let common: Common; let uiHelper: UIhelper; let catalogImport: CatalogImport; @@ -27,6 +29,7 @@ test.describe.serial("GitHub Happy path", () => { backstageShowcase = new BackstageShowcase(page); await common.loginAsGithubUser(); }); + test.beforeEach( async () => await new Common(page).checkAndClickOnGHloginPopup(), ); @@ -34,7 +37,7 @@ test.describe.serial("GitHub Happy path", () => { test("Verify Profile is Github Account Name in the Settings page", async () => { await uiHelper.openSidebar("Settings"); await expect(page).toHaveURL("/settings"); - await uiHelper.verifyHeading(process.env.GH_USER_ID as string); + await uiHelper.verifyHeading(process.env.GH_USER_ID); await uiHelper.verifyHeading(`User Entity: ${process.env.GH_USER_ID}`); }); @@ -118,7 +121,7 @@ test.describe.serial("GitHub Happy path", () => { await backstageShowcase.verifyPRRows(closedPRs, 0, 5); }); - //TODO https://issues.redhat.com/browse/RHIDP-3159 The last ~10 GitHub Pull Requests are missing from the list + // TODO https://issues.redhat.com/browse/RHIDP-3159 The last ~10 GitHub Pull Requests are missing from the list test.skip("Click on the arrows to verify that the next/previous/first/last pages of PRs are loaded", async () => { console.log("Fetching all PRs from GitHub"); const allPRs = await BackstageShowcase.getShowcasePRs("all", true); diff --git a/e2e-tests/playwright/e2e/plugins/analytics/analytics-disabled-rbac.spec.ts b/e2e-tests/playwright/e2e/plugins/analytics/analytics-disabled-rbac.spec.ts index b07a430dfe..3042464c1e 100644 --- a/e2e-tests/playwright/e2e/plugins/analytics/analytics-disabled-rbac.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/analytics/analytics-disabled-rbac.spec.ts @@ -3,7 +3,8 @@ import { Common } from "../../../utils/Common"; import { UIhelper } from "../../../utils/UIhelper"; import { UIhelperPO } from "../../../support/pageObjects/global-obj"; -test.describe('Check RBAC "analytics-provider-segment" plugin', () => { +// TODO: reenable tests +test.describe.skip('Check RBAC "analytics-provider-segment" plugin', () => { let common: Common; let uiHelper: UIhelper; diff --git a/e2e-tests/playwright/e2e/plugins/rbac/rbac-api.spec.ts b/e2e-tests/playwright/e2e/plugins/rbac/rbac-api.spec.ts index a9972bed96..ceef7b658e 100644 --- a/e2e-tests/playwright/e2e/plugins/rbac/rbac-api.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/rbac/rbac-api.spec.ts @@ -5,7 +5,8 @@ import { UIhelper } from "../../../utils/UIhelper"; import { RbacConstants } from "../../../data/rbac-constants"; import { RhdhAuthHack } from "../../../support/api/rhdh-auth-hack"; -test.describe("Test RBAC plugin REST API", () => { +// TODO: reenable tests +test.describe.skip("Test RBAC plugin REST API", () => { let common: Common; let uiHelper: UIhelper; let page: Page; diff --git a/e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts b/e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts index de82e2dd95..5332ba2407 100644 --- a/e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts @@ -11,74 +11,77 @@ import { Common, setupBrowser } from "../../../utils/Common"; import { UIhelper } from "../../../utils/UIhelper"; import fs from "fs/promises"; -test.describe - .serial("Test RBAC plugin: load permission policies and conditions from files", () => { - let common: Common; - let uiHelper: UIhelper; - let page: Page; +// TODO: reenable tests, replace skip with serial +test.describe.skip( + "Test RBAC plugin: load permission policies and conditions from files", + () => { + let common: Common; + let uiHelper: UIhelper; + let page: Page; + + test.beforeAll(async ({ browser }, testInfo) => { + page = (await setupBrowser(browser, testInfo)).page; + + uiHelper = new UIhelper(page); + common = new Common(page); + await common.loginAsGithubUser(); + await uiHelper.openSidebarButton("Administration"); + await uiHelper.openSidebar("RBAC"); + await uiHelper.verifyHeading("RBAC"); + }); - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; + test.beforeEach( + async () => await new Common(page).checkAndClickOnGHloginPopup(), + ); - uiHelper = new UIhelper(page); - common = new Common(page); - await common.loginAsGithubUser(); - await uiHelper.openSidebarButton("Administration"); - await uiHelper.openSidebar("RBAC"); - await uiHelper.verifyHeading("RBAC"); - }); + test("Check if permission policies defined in files are loaded and effective", async () => { + const testRole: string = "role:default/test2-role"; - test.beforeEach( - async () => await new Common(page).checkAndClickOnGHloginPopup(), - ); + await uiHelper.verifyHeading(/All roles \(\d+\)/); + await uiHelper.verifyLink(testRole); + await uiHelper.clickLink(testRole); - test("Check if permission policies defined in files are loaded and effective", async () => { - const testRole: string = "role:default/test2-role"; + await uiHelper.verifyHeading(testRole); + await uiHelper.clickTab("Overview"); - await uiHelper.verifyHeading(/All roles \(\d+\)/); - await uiHelper.verifyLink(testRole); - await uiHelper.clickLink(testRole); + await uiHelper.verifyText("About"); + await uiHelper.verifyText("csv permission policy file"); - await uiHelper.verifyHeading(testRole); - await uiHelper.clickTab("Overview"); + await uiHelper.verifyHeading("Users and groups (1 group"); + await uiHelper.verifyHeading("Permission policies (2)"); + const permissionPoliciesColumnsText = + Roles.getPermissionPoliciesListColumnsText(); + await uiHelper.verifyColumnHeading(permissionPoliciesColumnsText); + const permissionPoliciesCellsIdentifier = + Roles.getPermissionPoliciesListCellsIdentifier(); + await uiHelper.verifyCellsInTable(permissionPoliciesCellsIdentifier); - await uiHelper.verifyText("About"); - await uiHelper.verifyText("csv permission policy file"); + await expect(page.getByRole("article")).toContainText("catalog-entity"); + await expect(page.getByRole("article")).toContainText("Read, Update"); + await expect(page.getByRole("article")).toContainText("Delete"); - await uiHelper.verifyHeading("Users and groups (1 group"); - await uiHelper.verifyHeading("Permission policies (2)"); - const permissionPoliciesColumnsText = - Roles.getPermissionPoliciesListColumnsText(); - await uiHelper.verifyColumnHeading(permissionPoliciesColumnsText); - const permissionPoliciesCellsIdentifier = - Roles.getPermissionPoliciesListCellsIdentifier(); - await uiHelper.verifyCellsInTable(permissionPoliciesCellsIdentifier); - - await expect(page.getByRole("article")).toContainText("catalog-entity"); - await expect(page.getByRole("article")).toContainText("Read, Update"); - await expect(page.getByRole("article")).toContainText("Delete"); - - await page.getByTestId("update-members").getByLabel("Update").click(); - await expect(page.locator("tbody")).toContainText("rhdh-qe-2-team"); - await uiHelper.clickButton("Next"); - await page.getByLabel("configure-access").first().click(); - await expect(page.getByPlaceholder("string, string")).toHaveValue( - "group:janus-qe/rhdh-qe-2-team,$currentUser", - ); - await page.getByTestId("cancel-conditions").click(); - await page.getByLabel("configure-access").nth(1).click(); - await expect(page.getByPlaceholder("string, string")).toHaveValue( - "$currentUser", - ); - await page.getByTestId("cancel-conditions").click(); - await uiHelper.clickButton("Next"); - await uiHelper.clickButton("Cancel"); - }); + await page.getByTestId("update-members").getByLabel("Update").click(); + await expect(page.locator("tbody")).toContainText("rhdh-qe-2-team"); + await uiHelper.clickButton("Next"); + await page.getByLabel("configure-access").first().click(); + await expect(page.getByPlaceholder("string, string")).toHaveValue( + "group:janus-qe/rhdh-qe-2-team,$currentUser", + ); + await page.getByTestId("cancel-conditions").click(); + await page.getByLabel("configure-access").nth(1).click(); + await expect(page.getByPlaceholder("string, string")).toHaveValue( + "$currentUser", + ); + await page.getByTestId("cancel-conditions").click(); + await uiHelper.clickButton("Next"); + await uiHelper.clickButton("Cancel"); + }); - test.afterAll(async () => { - await page.close(); - }); -}); + test.afterAll(async () => { + await page.close(); + }); + }, +); test.describe .serial("Test RBAC plugin: Aliases used in conditional access policies", () => { diff --git a/e2e-tests/playwright/support/pageObjects/global-obj.ts b/e2e-tests/playwright/support/pageObjects/global-obj.ts index f34f686886..04d6b62816 100644 --- a/e2e-tests/playwright/support/pageObjects/global-obj.ts +++ b/e2e-tests/playwright/support/pageObjects/global-obj.ts @@ -4,7 +4,10 @@ export const waitsObjs = { }; export const UIhelperPO = { - MuiButtonLabel: 'span[class^="MuiButton-label"]', + // MUI v4 buttons are spans with a class starting with MuiButton-label + // MUI v5 buttons are HTML buttons with a class containing MuiButton-root + MuiButtonLabel: + 'span[class^="MuiButton-label"],button[class~="MuiButton-root"]', MuiToggleButtonLabel: 'span[class^="MuiToggleButton-label"]', MuiBoxLabel: 'div[class*="MuiBox-root"] label', MuiTableHead: 'th[class*="MuiTableCell-root"]',