admin: prettier formatting for the toolbar-era files, missed before ci ever ran them
Gates / frontend (push) Successful in 2m10s
Gates / test (push) Successful in 2m30s
Gates / test-aarch64 (push) Successful in 7m24s
Gates / package (push) Successful in 4m39s
Gates / container (push) Successful in 16s
CI / gates (push) Successful in 29m46s
Gates / frontend (push) Successful in 2m10s
Gates / test (push) Successful in 2m30s
Gates / test-aarch64 (push) Successful in 7m24s
Gates / package (push) Successful in 4m39s
Gates / container (push) Successful in 16s
CI / gates (push) Successful in 29m46s
This commit is contained in:
@@ -332,7 +332,11 @@ test("Related carries its four links and no control, blocked query or not", asyn
|
|||||||
|
|
||||||
await screen.findByRole("heading", { name: "example.com" });
|
await screen.findByRole("heading", { name: "example.com" });
|
||||||
await waitFor(() => expect(within(related()).getByText("Diagnostics around this query")).toBeTruthy());
|
await waitFor(() => expect(within(related()).getByText("Diagnostics around this query")).toBeTruthy());
|
||||||
expect(within(related()).getAllByRole("link").map((link) => link.textContent)).toEqual([
|
expect(
|
||||||
|
within(related())
|
||||||
|
.getAllByRole("link")
|
||||||
|
.map((link) => link.textContent),
|
||||||
|
).toEqual([
|
||||||
"Test this domain against current policy",
|
"Test this domain against current policy",
|
||||||
"All activity for this domain",
|
"All activity for this domain",
|
||||||
"All activity from this client",
|
"All activity from this client",
|
||||||
|
|||||||
@@ -68,13 +68,7 @@ export default function ActivityDetailPage() {
|
|||||||
<ProvenanceDetail
|
<ProvenanceDetail
|
||||||
provenance={detail}
|
provenance={detail}
|
||||||
persistedId={detail.id}
|
persistedId={detail.id}
|
||||||
relatedActions={
|
relatedActions={<RelatedActions domain={domain} client={client} ts={time} origin={origin} />}
|
||||||
<RelatedActions
|
|
||||||
domain={domain}
|
|
||||||
client={client}
|
|
||||||
ts={time}
|
|
||||||
origin={origin} />
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -76,9 +76,11 @@ function openTimeMenu() {
|
|||||||
|
|
||||||
test("the segments commit to the applied state on the click, with no button in between", () => {
|
test("the segments commit to the applied state on the click, with no button in between", () => {
|
||||||
const { patches, state } = renderFilters();
|
const { patches, state } = renderFilters();
|
||||||
expect(
|
expect(screen.getAllByRole("radio").map((radio) => radio.closest("label")?.textContent)).toEqual([
|
||||||
screen.getAllByRole("radio").map((radio) => radio.closest("label")?.textContent),
|
"Any",
|
||||||
).toEqual(["Any", "Blocked", "Allowed"]);
|
"Blocked",
|
||||||
|
"Allowed",
|
||||||
|
]);
|
||||||
|
|
||||||
fireEvent.click(screen.getByRole("radio", { name: "Blocked" }));
|
fireEvent.click(screen.getByRole("radio", { name: "Blocked" }));
|
||||||
expect(patches).toEqual([{ blocked: true }]);
|
expect(patches).toEqual([{ blocked: true }]);
|
||||||
@@ -325,12 +327,8 @@ test("a window moved from outside re-opens the custom row over the bounds it arr
|
|||||||
// that range — a Custom window with nothing to read is the label lying.
|
// that range — a Custom window with nothing to read is the label lying.
|
||||||
// jsdom's value sanitizer spells the milliseconds out, so the seeded text is
|
// jsdom's value sanitizer spells the milliseconds out, so the seeded text is
|
||||||
// the prefix rather than the whole of what the input holds.
|
// the prefix rather than the whole of what the input holds.
|
||||||
expect((screen.getByLabelText("Since") as HTMLInputElement).value).toContain(
|
expect((screen.getByLabelText("Since") as HTMLInputElement).value).toContain(unixToDatetimeLocal(since));
|
||||||
unixToDatetimeLocal(since),
|
expect((screen.getByLabelText("Until") as HTMLInputElement).value).toContain(unixToDatetimeLocal(since + 600));
|
||||||
);
|
|
||||||
expect((screen.getByLabelText("Until") as HTMLInputElement).value).toContain(
|
|
||||||
unixToDatetimeLocal(since + 600),
|
|
||||||
);
|
|
||||||
|
|
||||||
vi.restoreAllMocks();
|
vi.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -425,11 +425,7 @@ export default function ActivityFilters({ applied, onApply, onClear }: Props) {
|
|||||||
}
|
}
|
||||||
// The window is half-open — `ts >= since` and `ts < until` — so two equal
|
// The window is half-open — `ts >= since` and `ts < until` — so two equal
|
||||||
// bounds are as empty as an inverted pair, and neither is worth applying.
|
// bounds are as empty as an inverted pair, and neither is worth applying.
|
||||||
if (
|
if (sinceValue.value !== undefined && untilValue.value !== undefined && untilValue.value <= sinceValue.value) {
|
||||||
sinceValue.value !== undefined &&
|
|
||||||
untilValue.value !== undefined &&
|
|
||||||
untilValue.value <= sinceValue.value
|
|
||||||
) {
|
|
||||||
setError({
|
setError({
|
||||||
field: "until",
|
field: "until",
|
||||||
message: "Until must be after Since, or the range selects nothing.",
|
message: "Until must be after Since, or the range selects nothing.",
|
||||||
@@ -612,12 +608,7 @@ export default function ActivityFilters({ applied, onApply, onClear }: Props) {
|
|||||||
onClick={clear}
|
onClick={clear}
|
||||||
tabIndex={active ? undefined : -1}
|
tabIndex={active ? undefined : -1}
|
||||||
aria-hidden={active ? undefined : true}
|
aria-hidden={active ? undefined : true}
|
||||||
{...stylex.props(
|
{...stylex.props(shared.button, styles.hitTarget, shared.focusRing, !active && styles.clearHidden)}
|
||||||
shared.button,
|
|
||||||
styles.hitTarget,
|
|
||||||
shared.focusRing,
|
|
||||||
!active && styles.clearHidden,
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -148,10 +148,7 @@ export default function ActivityPage() {
|
|||||||
>
|
>
|
||||||
<div {...stylex.props(styles.header)}>
|
<div {...stylex.props(styles.header)}>
|
||||||
<h1 {...stylex.props(styles.heading)}>Activity</h1>
|
<h1 {...stylex.props(styles.heading)}>Activity</h1>
|
||||||
<TabList
|
<TabList aria-label="Activity mode" className={() => stylex.props(styles.switch).className ?? ""}>
|
||||||
aria-label="Activity mode"
|
|
||||||
className={() => stylex.props(styles.switch).className ?? ""}
|
|
||||||
>
|
|
||||||
{MODES.map((option) => (
|
{MODES.map((option) => (
|
||||||
<Tab
|
<Tab
|
||||||
key={option.mode}
|
key={option.mode}
|
||||||
|
|||||||
@@ -337,11 +337,7 @@ export default function AppShell() {
|
|||||||
{/* The column itself is the disclosure: the trigger sits in the header
|
{/* The column itself is the disclosure: the trigger sits in the header
|
||||||
and the panel opens below the notices, so any wrapper around only
|
and the panel opens below the notices, so any wrapper around only
|
||||||
the two would have to cut across the column's own flex children. */}
|
the two would have to cut across the column's own flex children. */}
|
||||||
<Disclosure
|
<Disclosure isExpanded={drawerOpen} onExpandedChange={setDrawerOpen} {...stylex.props(styles.column)}>
|
||||||
isExpanded={drawerOpen}
|
|
||||||
onExpandedChange={setDrawerOpen}
|
|
||||||
{...stylex.props(styles.column)}
|
|
||||||
>
|
|
||||||
<header {...stylex.props(styles.header)}>
|
<header {...stylex.props(styles.header)}>
|
||||||
<Button
|
<Button
|
||||||
slot="trigger"
|
slot="trigger"
|
||||||
|
|||||||
Reference in New Issue
Block a user