summaryrefslogtreecommitdiff
path: root/frontend/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/scripts')
-rw-r--r--frontend/scripts/ui-auth-shots.mjs17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/scripts/ui-auth-shots.mjs b/frontend/scripts/ui-auth-shots.mjs
index 9507b6d..2db1f1d 100644
--- a/frontend/scripts/ui-auth-shots.mjs
+++ b/frontend/scripts/ui-auth-shots.mjs
@@ -155,6 +155,22 @@ for (const w of widths) {
breadcrumbText: document.querySelector('nav.crumbs')?.textContent.replace(/\s+/g, ' ').trim() || null,
sparklineCells: document.querySelectorAll('[data-testid="sparkline-cell"]').length,
metricCards: document.querySelectorAll('[data-testid="metric-card"]').length,
+ cardRadius: (function () {
+ const r = document.querySelector('[data-slot="card"]');
+ if (!r) return null;
+ const target = String(getComputedStyle(document.documentElement).getPropertyValue('--radius')).trim();
+ return { computed: getComputedStyle(r).borderRadius, token: getComputedStyle(document.documentElement).getPropertyValue('--radius') || target };
+ })(),
+ cardRadiusOk: (function () {
+ const r = document.querySelector('[data-slot="card"]');
+ if (!r) return null;
+ const root = getComputedStyle(document.documentElement);
+ const tok = parseFloat(root.getPropertyValue('--radius'));
+ const rootFs = parseFloat(root.fontSize);
+ const expected = tok * rootFs;
+ const n = parseFloat(getComputedStyle(r).borderRadius);
+ return n >= expected - 0.5 && tok >= 0.749;
+ })(),
projects: (window.__probeProjects !== undefined) ? window.__probeProjects : null,
runs: null,
hasEquity: null,
@@ -170,6 +186,7 @@ for (const w of widths) {
' overflow=' + dom.overflow + ' pageErrors=' + pageErrors.length +
' tabbarAttached=' + dom.tabbarAttached + ' tabbarVisible=' + dom.tabbarVisible +
' metricCards=' + dom.metricCards + ' sparks=' + dom.sparklineCells +
+ ' radiusOk=' + dom.cardRadiusOk +
(dom.breadcrumbText ? ' crumbs="' + dom.breadcrumbText + '"' : '')
);
if (dom.overflow !== 0 || pageErrors.length !== 0) bad++;