Skip to content
Open
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
2 changes: 1 addition & 1 deletion workspaces/adoption-insights/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@eslint/js": "^9.39.2",
"@playwright/test": "1.57.0",
"@red-hat-developer-hub/e2e-test-utils": "2.1.0",
"@red-hat-developer-hub/e2e-test-utils": "2.1.1",
"@types/node": "^24.10.1",
"eslint": "^9.39.2",
"eslint-plugin-check-file": "^3.3.1",
Expand Down
10 changes: 5 additions & 5 deletions workspaces/adoption-insights/e2e-tests/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ __metadata:
languageName: node
linkType: hard

"@red-hat-developer-hub/e2e-test-utils@npm:2.1.0":
version: 2.1.0
resolution: "@red-hat-developer-hub/e2e-test-utils@npm:2.1.0"
"@red-hat-developer-hub/e2e-test-utils@npm:2.1.1":
version: 2.1.1
resolution: "@red-hat-developer-hub/e2e-test-utils@npm:2.1.1"
dependencies:
"@axe-core/playwright": "npm:4.11.1"
"@backstage-community/plugin-rbac-common": "npm:1.26.0"
Expand All @@ -379,7 +379,7 @@ __metadata:
zx: "npm:8.8.5"
peerDependencies:
"@playwright/test": ^1.57.0
checksum: 10/060567ca547c612d4565dad005d8ddd63faad941db1df5362ad598b5827eeac9e937cbacb8c26f62f59b7b1479e6b3614e29afd9bdf95832ebd1691d77f198e6
checksum: 10/88acffa840a9b7087a62ab6c3ef97ca2fff9604af1e88658ca820928610f631ccf3a3c1d6a8f8126503bc2ad07b3c4e80dc25909829feb80282ed75140566363
languageName: node
linkType: hard

Expand Down Expand Up @@ -765,7 +765,7 @@ __metadata:
dependencies:
"@eslint/js": "npm:^9.39.2"
"@playwright/test": "npm:1.57.0"
"@red-hat-developer-hub/e2e-test-utils": "npm:2.1.0"
"@red-hat-developer-hub/e2e-test-utils": "npm:2.1.1"
"@types/node": "npm:^24.10.1"
eslint: "npm:^9.39.2"
eslint-plugin-check-file: "npm:^3.3.1"
Expand Down
16 changes: 4 additions & 12 deletions workspaces/backstage/e2e-tests/support/pages/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,18 @@ export class NotificationPage {
await expect(row).toHaveCount(1);
}

async selectNotification(nth = 1) {
await this.page.getByRole("checkbox").nth(nth).click();
}

async selectSeverity(severity = "") {
await this.page.getByLabel("Severity").click();
await this.page.getByLabel("Min severity").click();
await this.page.getByRole("option", { name: severity }).click();
await expect(
this.page.getByRole("table").filter({ hasText: "Rows per page" }),
).toBeVisible();
await this.uiHelper.waitForLoad();
}

async saveSelected() {
await this.page
.locator("thead")
.getByTitle("Save selected for later")
.getByRole("button")
.click();
await this.uiHelper.waitForLoad();
async saveNotification(text: string | RegExp) {
const row = this.page.locator(`tr`, { hasText: text }).first();
await row.getByRole("button", { name: "Save selected for later" }).click();
}

async viewSaved() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
test.beforeAll(async ({ rhdh }) => {
requireEnv("VAULT_GITHUB_APP_WEBHOOK_SECRET");

const ghcrRegistry = "ghcr.io/redhat-developer/rhdh-plugin-export-overlays";
process.env.NIGHTLY_DPDY_OCI_REGISTRY_MAP = JSON.stringify({
[ghcrRegistry]: ["@backstage/plugin-events-backend-module-github"],
});

await rhdh.configure({
auth: "keycloak",
appConfig: "tests/config/github-events/app-config-rhdh.yaml",
Expand Down Expand Up @@ -213,7 +218,7 @@
.toBe(false);
});

test.afterAll(async () => {

Check warning on line 221 in workspaces/backstage/e2e-tests/tests/specs/github-events-module.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Code Quality

Hooks should come before test cases
await GitHubApiHelper.deleteGitHubRepo(
catalogRepoDetails.owner,
catalogRepoDetails.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
payload: {
title,
description: `Test ${title}`,
severity: severity || "Normal",
severity: severity || "normal",
topic: `Testing ${title}`,
},
};
Expand Down Expand Up @@ -59,10 +59,10 @@
const notificationTitle = "UI Notification By Severity";

for (const severity of severities) {
test(`Filter notifications by severity - ${severity}`, async () => {

Check warning on line 62 in workspaces/backstage/e2e-tests/tests/specs/notifications.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Code Quality

Test has no assertions
const notificationId = await createNotification(
notificationTitle,
severity,
severity.toLowerCase(),
);
await notificationPage.clickNotificationsNavBarItem();
await notificationPage.selectSeverity(severity);
Expand All @@ -72,7 +72,7 @@
});

test.describe("Mark notification tests", () => {
test("Mark notification as read", async () => {

Check warning on line 75 in workspaces/backstage/e2e-tests/tests/specs/notifications.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Code Quality

Test has no assertions
const notificationId = await createNotification(
"UI Notification Mark as read",
);
Expand All @@ -85,7 +85,7 @@
);
});

test("Mark notification as unread", async () => {

Check warning on line 88 in workspaces/backstage/e2e-tests/tests/specs/notifications.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Code Quality

Test has no assertions
const notificationId = await createNotification(
"UI Notification Mark as unread",
);
Expand All @@ -103,13 +103,12 @@
);
});

test("Mark notification as saved", async () => {

Check warning on line 106 in workspaces/backstage/e2e-tests/tests/specs/notifications.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Code Quality

Test has no assertions
const notificationId = await createNotification(
"UI Notification Mark as saved",
);
await notificationPage.clickNotificationsNavBarItem();
await notificationPage.selectNotification();
await notificationPage.saveSelected();
await notificationPage.saveNotification(notificationId);
await notificationPage.viewSaved();
await notificationPage.notificationContains(
new RegExp(`${notificationId}.*(a few seconds ago)|(a minute ago)`),
Expand Down
2 changes: 1 addition & 1 deletion workspaces/extensions/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@eslint/js": "10.0.1",
"@playwright/test": "1.59.1",
"@red-hat-developer-hub/e2e-test-utils": "1.1.45",
"@red-hat-developer-hub/e2e-test-utils": "2.1.1",
"@types/node": "25.5.2",
"dotenv": "17.4.1",
"eslint": "10.2.0",
Expand Down
31 changes: 17 additions & 14 deletions workspaces/extensions/e2e-tests/tests/specs/extensions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test.describe("Admin > Extensions", () => {
const supportTypeOptions = [
"Generally available (GA)",
"Tech preview (TP)",
"Dev preview (DP)",
"Custom plugin",
"Community plugin",
];
const provider = "Red Hat";
Expand Down Expand Up @@ -48,8 +48,8 @@ test.describe("Admin > Extensions", () => {
test.describe("Extensions > Catalog", () => {
// eslint-disable-next-line playwright/expect-expect -- uiHelper.verifyHeading asserts internally
test("Verify search bar in extensions", async ({ page }) => {
await extensions.searchExtensions("Dynatrace");
await uiHelper.verifyHeading("DynaTrace");
await extensions.searchExtensions("Bulk Import");
await uiHelper.verifyHeading("Bulk Import");
await page
.getByRole("button", {
name: "Clear Search",
Expand All @@ -71,9 +71,11 @@ test.describe("Admin > Extensions", () => {
await extensions.selectDropdown("Author");
await extensions.toggleOption("Red Hat");
await page.keyboard.press(`Escape`);
await uiHelper.verifyHeading("Argo CD");
await uiHelper.verifyHeading("Pipelines With Tekton");
await uiHelper.verifyText(" by " + "Red Hat");
await page.getByRole("heading", { name: "Argo CD" }).click();
await page
.getByRole("heading", { name: "Pipelines With Tekton" })
.click();
await uiHelper.verifyTableHeadingAndRows([
"Package name",
"Version",
Expand Down Expand Up @@ -177,20 +179,21 @@ test.describe("Admin > Extensions", () => {
});

// eslint-disable-next-line playwright/expect-expect -- assertions inside ExtensionsPage helpers
test("Verify dev preview badge in extensions", async () => {
await extensions.selectSupportTypeFilter("Dev preview (DP)");
await uiHelper.verifyHeading("Konflux");
test("Verify custom plugin badge in extensions", async () => {
await extensions.selectSupportTypeFilter("Custom plugin");
await uiHelper.verifyHeading("Github Events Backend Module");

await extensions.verifyPluginDetails({
pluginName: "Konflux",
badgeLabel: "An early-stage, experimental plugin",
badgeText: "Dev preview (DP)",
headings: commonHeadings,
pluginName: "Github Events Backend Module",
badgeLabel: "Plugin still in development",
badgeText: "Tech preview (TP)",
headings: commonHeadings.filter((value) => value !== "Tags"),
includeTable: true,
includeAbout: false,
author: "Backstage Community",
});

await extensions.resetSupportTypeFilter("Dev preview (DP)");
await extensions.resetSupportTypeFilter("Custom plugin");
});

test("Verify community plugin badge in extensions", async ({
Expand All @@ -200,7 +203,7 @@ test.describe("Admin > Extensions", () => {
await extensions.selectSupportTypeFilter("Community plugin");

await extensions.clickReadMoreByPluginTitle(
"ServiceNow Integration for Red Hat Developer Hub",
"Pipelines With Tekton",
"Community plugin",
);
await expect(
Expand Down
15 changes: 10 additions & 5 deletions workspaces/extensions/e2e-tests/tests/support/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export class ExtensionsPage {
this.uiHelper = uiHelper;
}

async clickReadMoreByPluginTitle(pluginTitle: string, badgeText: string) {
async clickReadMoreByPluginTitle(
pluginTitle: string,
badgeText: string,
author = "Red Hat",
) {
const allCards = this.page.locator(".v5-MuiPaper-outlined");
const targetCard = allCards.filter({ hasText: pluginTitle });
await targetCard
Expand All @@ -38,10 +42,9 @@ export class ExtensionsPage {
})
.click();
await expect(
this.page.getByText(pluginTitle + " " + " by " + " Red Hat" + badgeText, {
exact: true,
}),
this.page.getByText(`${pluginTitle} by ${author}`),
).toBeVisible();
await expect(this.page.getByText(badgeText)).toBeVisible();
}

async selectDropdown(name: string) {
Expand Down Expand Up @@ -107,15 +110,17 @@ export class ExtensionsPage {
headings = this.commonHeadings,
includeTable = true,
includeAbout = false,
author = "Red Hat",
}: {
pluginName: string;
badgeLabel: string;
badgeText: string;
headings?: string[];
includeTable?: boolean;
includeAbout?: boolean;
author?: string;
}) {
await this.clickReadMoreByPluginTitle(pluginName, badgeText);
await this.clickReadMoreByPluginTitle(pluginName, badgeText, author);
await expect(
this.page.getByLabel(badgeLabel).getByText(badgeText),
).toBeVisible();
Expand Down
10 changes: 5 additions & 5 deletions workspaces/extensions/e2e-tests/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ __metadata:
languageName: node
linkType: hard

"@red-hat-developer-hub/e2e-test-utils@npm:1.1.45":
version: 1.1.45
resolution: "@red-hat-developer-hub/e2e-test-utils@npm:1.1.45"
"@red-hat-developer-hub/e2e-test-utils@npm:2.1.1":
version: 2.1.1
resolution: "@red-hat-developer-hub/e2e-test-utils@npm:2.1.1"
dependencies:
"@axe-core/playwright": "npm:4.11.1"
"@backstage-community/plugin-rbac-common": "npm:1.26.0"
Expand All @@ -288,7 +288,7 @@ __metadata:
zx: "npm:8.8.5"
peerDependencies:
"@playwright/test": ^1.57.0
checksum: 10/32353ca9f259b9c5b025164ec13763cffb7dc3a54621d2f1db3e29808adea66219ad0b6aa04abb879e622478cf3c368dbeb3b028e99538199bdb58b3e0f63e11
checksum: 10/88acffa840a9b7087a62ab6c3ef97ca2fff9604af1e88658ca820928610f631ccf3a3c1d6a8f8126503bc2ad07b3c4e80dc25909829feb80282ed75140566363
languageName: node
linkType: hard

Expand Down Expand Up @@ -1021,7 +1021,7 @@ __metadata:
dependencies:
"@eslint/js": "npm:10.0.1"
"@playwright/test": "npm:1.59.1"
"@red-hat-developer-hub/e2e-test-utils": "npm:1.1.45"
"@red-hat-developer-hub/e2e-test-utils": "npm:2.1.1"
"@types/node": "npm:25.5.2"
dotenv: "npm:17.4.1"
eslint: "npm:10.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ test.describe.serial("Dynamic home page customization", () => {
const namespace = rhdh.deploymentConfig.namespace;
await $`oc apply -f ${rbacConfigmapPath} -n ${namespace}`;

const ghcrRegistry =
"ghcr.io/redhat-developer/rhdh-plugin-export-overlays";
process.env.NIGHTLY_DPDY_OCI_REGISTRY_MAP = JSON.stringify({
[ghcrRegistry]: ["@roadiehq/scaffolder-backend-module-http-request"],
});

await rhdh.configure({
auth: "keycloak",
disableWrappers: DYNAMIC_HOME_PAGE_WRAPPER_DIST_NAMES,
Expand Down Expand Up @@ -77,7 +83,7 @@ test.describe.serial("Dynamic home page customization", () => {
});

test("Verify cards can be resized in edit mode", async () => {
await home.addWidget("Entity Section");
await home.addWidget("Entity section");
await home.resizeFirstCard();
await home.exitEditMode();
});
Expand Down Expand Up @@ -109,7 +115,7 @@ test.describe.serial("Dynamic home page customization", () => {
await home.clearAllCardsWithButton();
await home.verifyCardsDeleted();

await home.addWidget("Entity Section");
await home.addWidget("Entity section");
await home.addWidget("Recently visited");
await home.exitEditMode();

Expand All @@ -124,8 +130,8 @@ test.describe.serial("Dynamic home page customization", () => {
await home.enterEditMode();
await home.clearAllCardsWithButton();
await home.verifyCardsDeleted();
await home.addWidget("Entity Section");
await home.addWidget("Entity Section");
await home.addWidget("Entity section");
await home.addWidget("Entity section");
await home.exitEditMode();

const cardCount = await home.getVisibleCardCount();
Expand All @@ -135,8 +141,8 @@ test.describe.serial("Dynamic home page customization", () => {
test("Widget layout survives edit mode toggle", async () => {
await home.enterEditMode();
await home.clearAllCardsWithButton();
await home.addWidget("Entity Section");
await home.addWidget("Onboarding Section");
await home.addWidget("Entity section");
await home.addWidget("Onboarding section");
await home.exitEditMode();

const countAfterSave = await home.getVisibleCardCount();
Expand Down Expand Up @@ -178,7 +184,7 @@ test.describe.serial("Dynamic home page customization", () => {
test("Resized layout persists after reload", async () => {
await home.enterEditMode();
await home.clearAllCardsWithButton();
await home.addWidget("Entity Section");
await home.addWidget("Entity section");
await home.resizeFirstCard();
await home.exitEditMode();
const panel = page.locator('[class*="react-grid-item"]').first();
Expand Down
14 changes: 8 additions & 6 deletions workspaces/homepage/e2e-tests/tests/utils/dynamic-homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const EXPECTED_CARD_TEXTS = [

/** All widgets available in the "Add widget" dialog. */
export const AVAILABLE_WIDGETS = [
"Onboarding Section",
"Entity Section",
"Onboarding section",
"Entity section",
"Recently visited",
"Top visited",
] as const;
Expand Down Expand Up @@ -174,8 +174,8 @@ export class DynamicHomePagePo {
async seedHomePageWidgets(): Promise<void> {
await this.enterEditMode();
await this.deleteAllCards();
await this.addWidget("Entity Section");
await this.addWidget("Onboarding Section");
await this.addWidget("Entity section");
await this.addWidget("Onboarding section");
await this.addWidget("Recently visited");
await this.addWidget("Top visited");
await this.exitEditMode();
Expand Down Expand Up @@ -283,7 +283,9 @@ export class DynamicHomePagePo {
await this.ui.clickButton("Add widget");
// eslint-disable-next-line playwright/no-wait-for-timeout -- dialog open
await this.page.waitForTimeout(1000);
await this.page.getByRole("button", { name: widgetType }).click();
await this.page
.getByRole("button", { name: widgetType, exact: true })
.click();
// eslint-disable-next-line playwright/no-wait-for-timeout -- widget mount
await this.page.waitForTimeout(1000);
}
Expand Down Expand Up @@ -316,7 +318,7 @@ export class DynamicHomePagePo {
await this.page.waitForTimeout(1000);
for (const widget of AVAILABLE_WIDGETS) {
await expect(
this.page.getByRole("button", { name: widget }),
this.page.getByRole("button", { name: widget, exact: true }),
).toBeVisible();
}
await this.page.keyboard.press("Escape");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import { registerUiPropsTestWorkflowTests } from "./ui-props-test-workflow.tests

test.describe("Orchestrator", () => {
test.beforeAll(async ({ rhdh }, testInfo) => {
const ghcrRegistry = "ghcr.io/redhat-developer/rhdh-plugin-export-overlays";
process.env.NIGHTLY_DPDY_OCI_REGISTRY_MAP = JSON.stringify({
[ghcrRegistry]: [
"@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki",
"@red-hat-developer-hub/backstage-plugin-scaffolder-backend-module-orchestrator",
],
});

// SonataFlow + OpenShift Logging install + RHDH deploy can exceed 40 minutes in CI.
test.setTimeout(60 * 60 * 1000);
await test.runOnce(
Expand Down
2 changes: 1 addition & 1 deletion workspaces/quay/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@eslint/js": "10.0.1",
"@playwright/test": "1.59.1",
"@red-hat-developer-hub/e2e-test-utils": "1.1.45",
"@red-hat-developer-hub/e2e-test-utils": "2.1.1",
"@types/node": "25.5.2",
"eslint": "10.2.0",
"eslint-plugin-check-file": "3.3.1",
Expand Down
Loading
Loading