Verified with the coordinated workspace changes by devkit full run 2026-09-08T225814-186389-0000-3e3ed7cd (all seven phases passed). This shared UI pass does not mark the individual module reviews complete.
22 lines
1.5 KiB
JavaScript
22 lines
1.5 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const pagePath = fileURLToPath(new URL("../src/features/notifications/NotificationCenterPage.tsx", import.meta.url));
|
|
const stylesPath = fileURLToPath(new URL("../src/styles/notifications.css", import.meta.url));
|
|
const page = readFileSync(pagePath, "utf8");
|
|
const styles = readFileSync(stylesPath, "utf8");
|
|
|
|
assert.match(page, /SelectionList,[\s\S]*SelectionListItem,[\s\S]*from "@govoplan\/core-webui"/);
|
|
assert.match(page, /<SelectionList\b(?=[^>]*\bvariant="navigation")(?=[^>]*\blabel="i18n:govoplan-notifications\.notifications")(?=[^>]*\bclassName="notifications-selection-list")[^>]*>/);
|
|
assert.match(page, /<SelectionListItem[\s\S]*selected=\{selected\?\.id === notification\.id\}/);
|
|
assert.match(page, /className=\{`notifications-list-item \$\{notification\.read_at \? "is-read" : ""\}`\}/);
|
|
assert.doesNotMatch(page, /<button[\s\S]{0,160}notifications-list-item/);
|
|
assert.doesNotMatch(styles, /\.notifications-list-item:(?:hover|focus-visible)/);
|
|
assert.doesNotMatch(styles, /\.notifications-list-item\.is-selected/);
|
|
assert.match(page, /<ConfirmDialog[\s\S]*open=\{confirmingAction === "cancel"\}/);
|
|
assert.match(page, /<ConfirmDialog[\s\S]*open=\{confirmingAction === "dispatch"\}/);
|
|
assert.match(page, /disabledReason=\{cancelDisabledReason\}/);
|
|
|
|
console.log("Notification center uses central selection, disabled-action, and confirmation contracts.");
|