feat: visual palette picker with accurate color previews (1.8.2)
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s

This commit is contained in:
kantarci committed 2026-09-14 12:42:21 +02:00
1 parent c1b152b376
commit 55dab4bc1e
11 files changed
+347 -39

No files matched your search

+6 -4
View File
@@ -487,7 +487,8 @@ try {
await frameValue('#headline', 'fontSize', '72px');
// Colours: a palette reference resolves to the theme variable, a hex value is taken as it is.
await page.locator('#style-color').locator('xpath=following-sibling::select').selectOption('@link');
await page.locator('#style-color').click();
await page.locator('#style-color-choices [data-color="@link"]').click();
await frameValue('#headline', 'color', 'rgb(164, 81, 15)');
const contrast = page.locator('.contrast-note');
await contrast.waitFor();
@@ -572,9 +573,10 @@ try {
// The background group is collapsed by default, and the readable field next to the swatch is
// what a person types into.
await openGroup('Hintergrund');
const hoverColor = page.locator('#style-backgroundColor-hover').locator('xpath=following-sibling::input[contains(@class,"color-text")]');
await page.locator('#style-backgroundColor-hover').click();
const hoverColor = page.locator('#style-backgroundColor-hover-hex');
await hoverColor.fill('#112233');
await hoverColor.blur();
await hoverColor.press('Enter');
// The preview carries its stylesheet as template text, applied by the editor as a constructed
// stylesheet; the hover rule has to arrive through that path, not as a style element.
await page.waitForFunction(() => {
@@ -857,7 +859,7 @@ try {
await visitorPage.getByRole('button', { name: 'Inhalt laden und einwilligen', exact: true }).click();
await visitorPage.locator('iframe').waitFor({ state: 'attached' });
assert.equal(await visitorPage.locator('.consent-bar').count(), 0, 'A decision is a decision.');
assert.equal(await visitorPage.locator('a[href="/einwilligung"]').count(), 1, 'Revoking has to stay reachable.');
assert.equal(await visitorPage.locator('.legal-bar').count(), 0, 'Footer links are placed by the author (since 1.8.1).');
await visitorPage.screenshot({ path: 'reports/editor/consent-granted.png', fullPage: false });
// And the way back: the consent page can refuse again, which blocks the embed once more.
await visitorPage.goto(origin + '/einwilligung');