Migrate Notifications interface patterns
This commit is contained in:
@@ -8,11 +8,14 @@ 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 label="Notifications" className="notifications-selection-list">/);
|
||||
assert.match(page, /<SelectionList label="i18n:govoplan-notifications\.notifications" className="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 rows use the central selection-list contract.");
|
||||
console.log("Notification center uses central selection, disabled-action, and confirmation contracts.");
|
||||
|
||||
Reference in New Issue
Block a user