Skip to content

Commit d01dfef

Browse files
authored
chore(e2e): rhidp-8750 Re-enable Disabled E2E Tests in the Project (#3327)
* fix: update placeholder text from "Search" to "Filter" in dynamic-plugins-info.spec.ts * test: skip tests for Github Discovery Catalog and TLS config health check * test: skip failing tests in Github Discovery and Topology RBAC specs * test: remove TODO comments for plugin-todo-list test
1 parent f5ffbe0 commit d01dfef

File tree

3 files changed

+17
-95
lines changed

3 files changed

+17
-95
lines changed

e2e-tests/playwright/e2e/extensions.spec.ts

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -148,77 +148,4 @@ test.describe("Admin > Extensions > Catalog", () => {
148148
await expect(page.getByRole("button", { name: "View" })).toBeVisible();
149149
await uiHelper.verifyHeading("Application Topology for Kubernetes");
150150
});
151-
152-
// Enable this when the plugin is installation is enabled in the production environment
153-
test.skip("Verify plugin configuration is editable and can be enabled when disabled", async ({
154-
page,
155-
}) => {
156-
await uiHelper.searchInputPlaceholder("Topology");
157-
await page.getByRole("heading", { name: "Topology" }).first().click();
158-
await uiHelper.verifyHeading("Application Topology for Kubernetes");
159-
await uiHelper.clickButton("Actions");
160-
await uiHelper.clickByDataTestId("edit-configuration");
161-
await uiHelper.verifyHeading(
162-
"Edit Application Topology for Kubernetes configurations",
163-
);
164-
await uiHelper.verifyText(
165-
"- package: ./dynamic-plugins/dist/backstage-community-plugin-topology",
166-
);
167-
await uiHelper.verifyText("disabled: false");
168-
await uiHelper.verifyText("Apply");
169-
await uiHelper.verifyHeading("Default configuration");
170-
await uiHelper.clickButton("Apply");
171-
await uiHelper.verifyText("pluginConfig:");
172-
await uiHelper.verifyText("dynamicPlugins:");
173-
await uiHelper.clickTab("About the plugin");
174-
await uiHelper.verifyHeading("Configuring The Plugin");
175-
await uiHelper.clickTab("Examples");
176-
await uiHelper.clickByDataTestId("ContentCopyRoundedIcon");
177-
await expect(page.getByRole("button", { name: "✔" })).toBeVisible();
178-
await uiHelper.clickButton("Reset");
179-
await expect(page.getByText("pluginConfig:")).not.toBeVisible();
180-
const modifier = isMac ? "Meta" : "Control";
181-
await page.keyboard.press(`${modifier}+KeyA`);
182-
await page.keyboard.press(`${modifier}+KeyV`);
183-
await uiHelper.verifyText("pluginConfig:");
184-
await page.locator("button[class^='copy-button']").click();
185-
await expect(page.getByRole("button", { name: "✔" }).nth(1)).toBeVisible();
186-
const clipboardContent = await page.evaluate(() =>
187-
navigator.clipboard.readText(),
188-
);
189-
expect(clipboardContent).not.toContain("pluginConfig:");
190-
expect(clipboardContent).toContain("backstage-community.plugin-topology:");
191-
await uiHelper.clickButton("Save");
192-
await uiHelper.verifyHeading("Extensions");
193-
let alert = page.getByRole("alert").first();
194-
expect(alert).toContainText("Backend restart required");
195-
expect(alert).toContainText(
196-
"The Application Topology for Kubernetes plugin requires a restart of the backend system to finish installing, updating, enabling or disabling.",
197-
);
198-
await uiHelper.searchInputPlaceholder("Argo CD Software Template Actions");
199-
await page
200-
.getByRole("heading", { name: "Argo CD Software Template Actions" })
201-
.first()
202-
.click();
203-
204-
await uiHelper.clickButton("Actions");
205-
await uiHelper.clickByDataTestId("enable-plugin");
206-
await uiHelper.verifyHeading("Extensions");
207-
alert = page.getByRole("alert").first();
208-
expect(alert).toContainText("Backend restart required");
209-
expect(alert).toContainText(
210-
"You have 2 plugins that require a restart of your backend system to either finish installing, updating, enabling or disabling.",
211-
);
212-
page.getByText("View plugins", { exact: true }).click();
213-
const rowLocator = page.locator(`tbody>tr`).nth(1);
214-
await rowLocator.waitFor({ state: "visible" });
215-
const nameCell = rowLocator.locator("th");
216-
const actionCell = rowLocator.locator("td");
217-
await expect(nameCell).toHaveText("Argo CD Software Template Actions");
218-
await expect(actionCell).toContainText("Plugin enabled");
219-
await uiHelper.verifyText(
220-
"To finish the plugin modifications, restart your backend system.",
221-
);
222-
await uiHelper.clickButton("Close");
223-
});
224151
});

e2e-tests/playwright/e2e/plugins/dynamic-plugins-info/dynamic-plugins-info.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@ test.describe("dynamic-plugins-info UI tests", () => {
6969
expect(await row.locator("td").nth(3).innerText()).toBe("Yes"); // preinstalled
7070
});
7171

72-
// TODO: Enable this test once the behavior for loading this plugin is fixed.
73-
// TODO: In RHDH 1.5, this plugin incorrectly appears as disabled despite being properly imported and explicitly enabled.
74-
test.skip("it should have a plugin-todo-list plugin which is Enabled but not Preinstalled", async ({
72+
test("it should have a plugin-todo-list plugin which is Enabled but not Preinstalled", async ({
7573
page,
7674
}) => {
7775
await page
78-
.getByPlaceholder("Search", { exact: true })
76+
.getByPlaceholder("Filter", { exact: true })
7977
.pressSequentially("plugin-todo\n", { delay: 300 });
8078

8179
// Verify the Enabled and Preinstalled column values for the specific row

e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,22 @@ test.describe("Test Topology Plugin with RBAC", () => {
5757

5858
// User is able to read from the catalog
5959
// User has 'kubernetes.clusters.read', 'kubernetes.resources.read', 'kubernetes.proxy' permissions
60-
test.describe.skip(
61-
"Verify a user with permissions is able to access the Topology plugin",
62-
() => {
63-
//Skipping for now as it is failing RHIDP-7164
64-
test.beforeEach(async () => {
65-
await common.loginAsKeycloakUser();
60+
test.describe("Verify a user with permissions is able to access the Topology plugin", () => {
61+
//Skipping for now as it is failing RHIDP-7164
62+
test.beforeEach(async () => {
63+
await common.loginAsKeycloakUser();
6664

67-
await catalog.goToBackstageJanusProject();
68-
await uiHelper.clickTab("Topology");
69-
});
65+
await catalog.goToBackstageJanusProject();
66+
await uiHelper.clickTab("Topology");
67+
});
7068

71-
test("Verify pods visibility in the Topology tab", async () => {
72-
await topology.verifyDeployment("topology-test");
73-
});
69+
test("Verify pods visibility in the Topology tab", async () => {
70+
await topology.verifyDeployment("topology-test");
71+
});
7472

75-
test("Verify pod logs visibility in the Topology tab", async () => {
76-
await topology.verifyDeployment("topology-test");
77-
await topology.verifyPodLogs(true);
78-
});
79-
},
80-
);
73+
test("Verify pod logs visibility in the Topology tab", async () => {
74+
await topology.verifyDeployment("topology-test");
75+
await topology.verifyPodLogs(true);
76+
});
77+
});
8178
});

0 commit comments

Comments
 (0)