test(ui): qualify account sections and editor hierarchy

This commit is contained in:
cesnimda
2026-11-04 01:41:02 +01:00
parent b6d830f279
commit 368e90d572
350 changed files with 6364 additions and 19 deletions
@@ -53,9 +53,9 @@ try {
const scan = async (state, keepScroll = false) => {
assert.equal(await page.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1), false, `overflow:${state}`);
const result = await new AxeBuilder({ page }).withTags(['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa']).analyze();
report.screens.push({ width, language, mode, state, violations: result.violations }); assert.deepEqual(result.violations, [], `${state} accessibility`);
report.screens.push({ width, language, mode, state, capture: keepScroll ? 'focused viewport' : width >= 768 ? 'full page at top' : 'viewport at top', violations: result.violations }); assert.deepEqual(result.violations, [], `${state} accessibility`);
if (!keepScroll) { await page.evaluate(() => window.scrollTo({ top: 0, behavior: 'instant' })); await expect.poll(() => page.evaluate(() => window.scrollY)).toBe(0); }
await page.screenshot({ path: path.join(out, `${state}-${language}-${mode}-${width}.png`), fullPage: width >= 768 });
await page.screenshot({ path: path.join(out, `${state}-${language}-${mode}-${width}.png`), fullPage: width >= 768 && !keepScroll });
};
if (!processingOnly) {
await page.goto('http://localhost:4338/profile');