优化总览活动列表与用户说明提示

This commit is contained in:
xuans committed 2026-09-25 09:36:08 +08:00
1 parent 2ac7342524
commit 0a9172f639
4 files changed
+31 -5

No files matched your search

@@ -566,3 +566,20 @@ test("domainAction.refreshesSuccessfulResultAndRetainsNotice", async (t) => {
assert.match(state.notice.value, /example\.test/);
assert.deepEqual(state.tasks.value, [{ id: "task-2", status: "success" }]);
});
test("dashboardLayout.keepsActivityListsBoundedAndKeyboardAccessible", async () => {
const { readFile } = await import("node:fs/promises");
const template = await readFile(new URL("./Dashboard.vue", import.meta.url), "utf8");
const stylesheet = await readFile(new URL("./Dashboard.css", import.meta.url), "utf8");
assert.equal((template.match(/class="record-list" tabindex="0"/g) || []).length, 3);
assert.match(stylesheet, /\.record-list\s*\{[^}]*max-height:\s*280px;[^}]*overflow-y:\s*auto;/);
assert.match(stylesheet, /\.record-list:focus-visible/);
});
test("dashboardLayout.usesSharedTooltipForUserManagementDescription", async () => {
const { readFile } = await import("node:fs/promises");
const template = await readFile(new URL("../UserManagement/UserManagement.vue", import.meta.url), "utf8");
assert.match(template, /import HelpTip from "\.\.\/components\/HelpTip\/HelpTip.vue";/);
assert.match(template, /<HelpTip>[\s\S]*?<\/HelpTip>/);
assert.doesNotMatch(template, /<p class="user-management-description">/);
});