mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
Merge web TrueNAS setup regression coverage
Change-source: pulse-maintainer
This commit is contained in:
@@ -269,11 +269,25 @@ test.describe("TrueNAS connections in the consolidated workspace", () => {
|
||||
.getByRole("textbox", { name: "API key", exact: true })
|
||||
.fill("secret-api-key");
|
||||
|
||||
// Missing key ownership must fail locally, not send an unusable credential.
|
||||
await dialog.getByRole("button", { name: "Test connection" }).click();
|
||||
await expect(
|
||||
page.getByText(
|
||||
"TrueNAS API key owner username is required for supported authentication",
|
||||
{ exact: true },
|
||||
),
|
||||
).toBeVisible();
|
||||
expect(draftTestPayload).toBeNull();
|
||||
|
||||
await dialog
|
||||
.getByRole("textbox", { name: /^API key owner username/ })
|
||||
.fill("pulse-monitor");
|
||||
await dialog.getByRole("button", { name: "Test connection" }).click();
|
||||
await expect.poll(() => draftTestPayload).not.toBeNull();
|
||||
expect(draftTestPayload).toMatchObject({
|
||||
host: "tower.local",
|
||||
apiKey: "secret-api-key",
|
||||
username: "pulse-monitor",
|
||||
});
|
||||
|
||||
await dialog.getByRole("button", { name: "Preview impact" }).click();
|
||||
@@ -290,6 +304,7 @@ test.describe("TrueNAS connections in the consolidated workspace", () => {
|
||||
name: "Tower NAS",
|
||||
host: "tower.local",
|
||||
apiKey: "secret-api-key",
|
||||
username: "pulse-monitor",
|
||||
useHttps: true,
|
||||
enabled: true,
|
||||
});
|
||||
@@ -352,6 +367,9 @@ test.describe("TrueNAS connections in the consolidated workspace", () => {
|
||||
.getByRole("textbox", { name: "API key", exact: true })
|
||||
.fill("secret-api-key");
|
||||
|
||||
await dialog
|
||||
.getByRole("textbox", { name: /^API key owner username/ })
|
||||
.fill("pulse-monitor");
|
||||
await dialog.getByRole("button", { name: "Add connection" }).click();
|
||||
|
||||
// The rejection surfaces the server's monitored-system explanation as an
|
||||
|
||||
Reference in New Issue
Block a user