fix tests and change invitation mechanics
Sonarqube Scanner / Prepare environment (push) Successful in 8s
Sonarqube Scanner / Build and test (push) Successful in 24s
Sonarqube Scanner / SonarQube analysis (push) Failing after 1m2s
Sonarqube Scanner / Deploy to Server (push) Successful in 6s

This commit is contained in:
Florian Zumpe
2026-10-19 17:21:50 +02:00
parent a66a795407
commit cacc63be66
13 changed files with 349 additions and 146 deletions
+8 -1
View File
@@ -1013,10 +1013,13 @@ test('shared drafts use guarded server saves, preserve the creator and retain un
test('sharing a local draft asks before sending and opens a separate shared copy', async () => {
const h = buildEditorContext();
const sharedIds = [];
const code = Array(5).fill('🐦');
let chosen = null;
h.context.confirm = () => false;
h.context.Wegwichtel.Groups = {
shareButton(action) { const button = new FakeElement('', 'button'); button.dataset.editorAction = action; return button; },
async share(id) { sharedIds.push(id); }
async chooseCode() { return chosen; },
async share(id, selected) { assert.equal(selected, code); sharedIds.push(id); }
};
await loadI18n(h.context);
const filename = path.join(root, 'public/js/editor-ui.js');
@@ -1027,6 +1030,10 @@ test('sharing a local draft asks before sending and opens a separate shared copy
list.dispatchEvent(pointerEvent(item.children[1].children[1]));
for (let i = 0; i < 4; i += 1) await tick();
assert.equal(h.calls.some(call => call.method === 'POST'), false);
chosen = code;
list.dispatchEvent(pointerEvent(item.children[1].children[1]));
for (let i = 0; i < 4; i += 1) await tick();
assert.equal(h.calls.some(call => call.method === 'POST'), false, 'declining transfer sends nothing');
h.context.confirm = () => true;
list.dispatchEvent(pointerEvent(item.children[1].children[1]));
list.dispatchEvent(pointerEvent(item.children[1].children[1]));