remove obsolete elements and cleanup gui
Sonarqube Scanner / Prepare environment (push) Successful in 9s
Sonarqube Scanner / Build and test (push) Successful in 31s
Sonarqube Scanner / SonarQube analysis (push) Successful in 1m22s
Sonarqube Scanner / Deploy to Server (push) Successful in 8s

This commit is contained in:
Florian Zumpe
2026-10-02 10:39:21 +02:00
parent a3ee08ad4d
commit bbb1834709
9 changed files with 101 additions and 118 deletions
+26 -1
View File
@@ -79,6 +79,10 @@ class FakeElement extends EventTarget {
this.dataset = {};
this.attributes = new Map();
this.focused = false;
this.classes = new Set();
this.classList = {
toggle: (name, enabled) => enabled ? this.classes.add(name) : this.classes.delete(name)
};
}
focus() {
@@ -140,6 +144,10 @@ test('legal overlay handlers synchronize switches without advancing the start sc
const cookieToggles = [new FakeElement()];
let enabled = false;
const changes = [];
const frames = [];
function flushFrames() {
while (frames.length) frames.shift()();
}
class TestCustomEvent extends Event {
constructor(type, options = {}) {
@@ -178,7 +186,8 @@ test('legal overlay handlers synchronize switches without advancing the start sc
document,
Event,
EventTarget,
CustomEvent: TestCustomEvent
CustomEvent: TestCustomEvent,
requestAnimationFrame: callback => frames.push(callback)
};
context.globalThis = context;
await loadI18n(context);
@@ -188,6 +197,22 @@ test('legal overlay handlers synchronize switches without advancing the start sc
assert.equal(elements.get('info-dropdown').hidden, false);
assert.equal(elements.get('info-button').attributes.get('aria-expanded'), 'true');
assert.equal(elements.get('info-dialog').open, false);
assert.equal(elements.get('info-dropdown').classes.has('is-open'), false);
frames.shift()();
assert.equal(elements.get('info-dropdown').classes.has('is-open'), false);
frames.shift()();
assert.equal(elements.get('info-dropdown').classes.has('is-open'), true);
elements.get('info-button').dispatchEvent(pointerEvent());
assert.equal(elements.get('info-dropdown').classes.has('is-open'), false);
elements.get('info-button').dispatchEvent(pointerEvent());
elements.get('info-button').dispatchEvent(pointerEvent());
flushFrames();
assert.equal(elements.get('info-dropdown').hidden, true);
assert.equal(elements.get('info-dropdown').classes.has('is-open'), false);
elements.get('info-button').dispatchEvent(pointerEvent());
flushFrames();
targetButtons[0].dispatchEvent(pointerEvent());
assert.equal(elements.get('info-dialog').open, true);