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
8 changes: 4 additions & 4 deletions packages/alert-dashboard/e2e/incidents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ test("Take on an unowned, eligible incident makes the viewer commander", async (
}) => {
await page.setViewportSize(DESKTOP);
await gotoLoadedPage(page, "/incidents/INC-5");
const command = page.locator(".inc-command-panel");
const command = page.getByRole("region", { name: "Command", exact: true });
await expect(command).toContainText("Unowned — takeover eligible now");

await command.getByRole("button", { name: "Take command" }).click();
await expect(page.getByRole("alert")).toHaveText(
"You hold command of INC-5.",
/You hold command of INC-5\.$/u,
);
await expect(command).toContainText("Owned by Hub browser");
await expect(
Expand All @@ -137,7 +137,7 @@ test("maintenance shows its owner without takeover language", async ({
}) => {
await page.setViewportSize(DESKTOP);
await gotoLoadedPage(page, "/incidents/INC-2");
const owner = page.locator(".inc-command-panel");
const owner = page.getByRole("region", { name: "Owner", exact: true });
await expect(owner.getByRole("heading", { name: "Owner" })).toBeVisible();
await expect(owner).toContainText("No owner");
await expect(owner).not.toContainText("eligible");
Expand Down Expand Up @@ -165,7 +165,7 @@ test("declaring onto a held system offers to join the existing incident", async
);
await notice.getByRole("button", { name: "Join it instead" }).click();
await expect(page).toHaveURL(/\/incidents\/INC-4$/u);
await expect(page.locator(".inc-detail")).toContainText("Hub browser");
await expect(page.getByRole("main")).toContainText("Hub browser");
});

test("incident pages fit a phone without sideways scrolling", async ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.ui-dl[data-layout="grid"] {
grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
gap: var(--ui-space-4) var(--ui-space-6);
align-items: start;
padding: var(--ui-space-3) var(--ui-gutter) var(--ui-space-4);
}
.ui-dl[data-layout="rail"] {
Expand All @@ -24,6 +25,7 @@
}
.ui-dl-item {
display: grid;
align-content: start;
gap: var(--ui-space-1);
min-width: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/incidents/src/client/client.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe("incident list", () => {
it("shows id, severity, status, systems, command, signals, affected, and age per row", () => {
const html = render(
<IncidentTable
captionId="caption"
caption="Open incidents"
nowMs={NOW_MS}
incidents={[
summary({
Expand Down Expand Up @@ -191,7 +191,7 @@ describe("incident list", () => {

it("says so when nothing matches", () => {
expect(
render(<IncidentTable captionId="c" nowMs={NOW_MS} incidents={[]} />),
render(<IncidentTable caption="c" nowMs={NOW_MS} incidents={[]} />),
).toContain("No incidents match these filters.");
});

Expand Down
9 changes: 1 addition & 8 deletions packages/incidents/src/client/conformance-allowlist.json
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
[
{
"rule": "bare-element-selector",
"file": "src/client/incidents.css",
"count": 37,
"reason": "Baseline for the layer rule: move element defaults into @layer ui.app and drop other app layer names."
}
]
[]
6 changes: 3 additions & 3 deletions packages/incidents/src/client/data-status.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, State } from "@shepherdjerred/console-ui";
import { Banner, Button, State } from "@shepherdjerred/console-ui";
import { Loaded, type LoadedMeta } from "@shepherdjerred/loaded/index.ts";

export function IncidentLoadError({
Expand Down Expand Up @@ -32,9 +32,9 @@ export function IncidentRefreshWarning({
const error = errors[0];
if (error === undefined) return null;
return (
<p className="inc-notice" data-sev="warning" role="status">
<Banner severity="warning" role="status">
Showing the last available data. Refresh failed.{" "}
{Loaded.messageOf(error.error)}
</p>
</Banner>
);
}
Loading