mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-08-25 17:02:10 +00:00
Recover spec 68 infrastructure onboarding against evolved discovery UI
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
Canonical Governance / governance (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 1/4) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 2/4) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 3/4) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 4/4) (push) Waiting to run
Core E2E Tests / E2E verdict (push) Blocked by required conditions
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
Canonical Governance / governance (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 1/4) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 2/4) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 3/4) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 4/4) (push) Waiting to run
Core E2E Tests / E2E verdict (push) Blocked by required conditions
The discovery-config surface changed: with discovery disabled by default the empty state offers a 'Configure discovery' button (which opens the Discovery settings dialog), and the 'Run discovery' scan button only renders once discovery is enabled. - Landing test: assert 'Configure discovery' and that 'Run discovery' is absent, instead of the stale 'Run discovery' / 'Discovery settings' button names. - Discovery settings dialog test: open it via 'Configure discovery' (the dialog title/copy/close-button assertions were already current). - Explicit discovery scan test: enable discovery for that test by passing the real /api/system/settings response through with discoveryEnabled flipped on, so the 'Run discovery' scan button appears and the candidate->review flow runs. Verified: all 5 desktop tests pass against the managed local backend. Contract-Neutral: E2E quarantine recovery
This commit is contained in:
parent
eddcbd5aa0
commit
816d55e03d
1 changed files with 24 additions and 5 deletions
|
|
@ -187,15 +187,18 @@ test.describe("Infrastructure onboarding", () => {
|
|||
await expect(
|
||||
page.getByText("Connected systems", { exact: true }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("button", { name: /Run discovery/i }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("button", { name: /Add infrastructure/i }),
|
||||
).toBeVisible();
|
||||
// Discovery is disabled by default, so the empty state offers
|
||||
// "Configure discovery" (which opens the Discovery settings dialog); the
|
||||
// "Run discovery" scan button only appears once discovery is enabled.
|
||||
await expect(
|
||||
page.getByRole("button", { name: /Discovery settings/i }),
|
||||
page.getByRole("button", { name: /Configure discovery/i }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("button", { name: /Run discovery/i }),
|
||||
).toHaveCount(0);
|
||||
await expect(page.getByText("VMware vCenter", { exact: true })).toHaveCount(
|
||||
0,
|
||||
);
|
||||
|
|
@ -237,7 +240,9 @@ test.describe("Infrastructure onboarding", () => {
|
|||
timeout: 15_000,
|
||||
});
|
||||
|
||||
await page.getByRole("button", { name: /Discovery settings/i }).click();
|
||||
// With discovery disabled, the control that opens the Discovery settings
|
||||
// dialog is labelled "Configure discovery".
|
||||
await page.getByRole("button", { name: /Configure discovery/i }).click();
|
||||
|
||||
const dialog = page.getByRole("dialog", { name: "Discovery settings" });
|
||||
await expect(dialog).toBeVisible();
|
||||
|
|
@ -312,6 +317,20 @@ test.describe("Infrastructure onboarding", () => {
|
|||
|
||||
await prepareOnboardingPage(page);
|
||||
|
||||
// The "Run discovery" scan button only renders when discovery is enabled.
|
||||
// Enable it by passing the real system-settings response through with
|
||||
// discoveryEnabled flipped on, so this test can exercise the scan flow.
|
||||
await page.route("**/api/system/settings", async (route) => {
|
||||
if (route.request().method() !== "GET") {
|
||||
await route.continue();
|
||||
return;
|
||||
}
|
||||
const response = await route.fetch();
|
||||
const body = await response.json();
|
||||
body.discoveryEnabled = true;
|
||||
await route.fulfill({ response, json: body });
|
||||
});
|
||||
|
||||
await page.route("**/api/discover", async (route) => {
|
||||
const requestUrl = new URL(route.request().url());
|
||||
if (requestUrl.pathname !== "/api/discover") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue