Polish approved 1.0 scope and verify portable previews

This commit is contained in:
SantaSpeen committed 2026-12-02 16:12:49 +03:00
1 parent 1819f35f91
commit 2b45df2816
181 files changed
+996 -139

No files matched your search

+30 -2
View File
@@ -16,8 +16,10 @@ p.on("pageerror", (e) => errors.push(e.message));
let passed = 0;
await mkdir("references/icons", { recursive: true });
try {
assert.equal(iconNames.length, 64);
assert.equal(new Set(iconNames).size, 64);
assert.equal(iconNames.length, 76);
for (const name of ["key-control", "key-alt", "windows", "linux"])
assert.ok(icons[name]);
assert.equal(new Set(iconNames).size, iconNames.length);
await p.goto(base + "/icons/");
await p.locator(".icon-tile").last().waitFor();
const bounds = await p.locator(".icon-tile svg").evaluateAll((es) =>
@@ -93,6 +95,27 @@ try {
for (const locale of ["ru", "en"]) {
await p.setViewportSize({ width, height: 900 });
await p.goto(`${base}/?page=security&theme=${theme}&locale=${locale}`);
if (width <= 600) {
const controls = p.locator(
".mobile-recent,.dock-brand,.dock-account",
);
for (const node of await controls.all()) {
if (!(await node.isVisible())) continue;
const rect = await node.boundingBox(),
glyph = await node.locator("svg,.avatar").first().boundingBox();
assert.ok(
Math.abs(glyph.x + glyph.width / 2 - (rect.x + rect.width / 2)) <
1,
);
assert.ok(
Math.abs(
glyph.y + glyph.height / 2 - (rect.y + rect.height / 2),
) < 1,
);
}
passed++;
continue;
}
await p.locator(".nav-icon").first().waitFor();
const nav = await p.locator(".navigation").boundingBox();
for (const button of await p
@@ -140,6 +163,11 @@ try {
await p.setViewportSize({ width: 960, height: 1140 });
for (const theme of ["light", "dark"]) {
await p.goto(`${base}/icons/preview-${theme}.svg`);
const height = await p
.locator("svg")
.first()
.evaluate((n) => n.height.baseVal.value);
await p.setViewportSize({ width: 960, height: Math.ceil(height) });
await p.screenshot({ path: `references/icons/preview-${theme}.png` });
}
// Full design export must include the icon module and a valid binary icon ZIP.