feat(KAN-36): rebuild profile and appearance settings
This commit is contained in:
@@ -84,15 +84,11 @@ try {
|
||||
renderTheme('light'),
|
||||
renderTheme('dark'),
|
||||
]);
|
||||
const selectedButton = (html) =>
|
||||
html.match(
|
||||
/<button[^>]*aria-pressed="true"[^>]*>([\s\S]*?)<\/button>/,
|
||||
)[1];
|
||||
assert.match(selectedButton(light), />Light</);
|
||||
assert.match(selectedButton(dark), />Dark</);
|
||||
assert.match(light, /role="group" aria-label="Color theme"/);
|
||||
assert.equal((light.match(/type="button"/g) ?? []).length, 3);
|
||||
assert.equal((dark.match(/aria-pressed="true"/g) ?? []).length, 1);
|
||||
assert.match(light, /value="light"[^>]*checked/);
|
||||
assert.match(dark, /value="dark"[^>]*checked/);
|
||||
assert.match(light, /<legend class="sr-only">Color theme<\/legend>/);
|
||||
assert.equal((light.match(/type="radio"/g) ?? []).length, 3);
|
||||
assert.equal((dark.match(/ checked/g) ?? []).length, 1);
|
||||
assert.equal(normalizeAppearance('unexpected'), 'system');
|
||||
|
||||
const blade = await readFile('resources/views/app.blade.php', 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user