test: check-sizes measures text and control heights per size mode (T8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 09:24:04 +02:00
co-authored by Claude Opus 5.5
parent 77ff80e60b
commit 5738abe3ef
2 changed files with 61 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// Saves a size mode on the logged-in user's account (needs the redmine_tonalmine plugin).
// No size resets the account to the default appearance.
export async function setSize(page, size) {
const status = await page.evaluate(async (body) => {
const headers = { 'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest',
'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]').content };
return (await fetch('/tonalmine/appearance', { method: 'PUT', headers, body: JSON.stringify(body) })).status;
}, size ? { size } : {});
if (status !== 204) throw new Error(`could not save size ${size ?? 'default'} (HTTP ${status})`);
}