Fix tests

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2025-05-09 22:02:56 +02:00
parent d08414c2a9
commit 2e6d0ecb65
No known key found for this signature in database
3 changed files with 18 additions and 8 deletions

View File

@ -35,6 +35,7 @@ const createAndSelectTwoRectangles = () => {
// The second rectangle is already reselected because it was the last element created
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
};
@ -52,6 +53,7 @@ const createAndSelectTwoRectanglesWithDifferentSizes = () => {
// The second rectangle is already reselected because it was the last element created
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
};
@ -202,6 +204,7 @@ describe("aligning", () => {
// The second rectangle is already reselected because it was the last element created
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
@ -215,6 +218,7 @@ describe("aligning", () => {
// Add the created group to the current selection
mouse.restorePosition(0, 0);
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
};
@ -316,6 +320,7 @@ describe("aligning", () => {
// The second rectangle is already selected because it was the last element created
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
@ -330,7 +335,7 @@ describe("aligning", () => {
mouse.down();
mouse.up(100, 100);
mouse.restorePosition(200, 200);
mouse.restorePosition(210, 200);
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.click();
});
@ -341,6 +346,7 @@ describe("aligning", () => {
// The second group is already selected because it was the last group created
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
};
@ -454,6 +460,7 @@ describe("aligning", () => {
// The second rectangle is already reselected because it was the last element created
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
@ -466,7 +473,7 @@ describe("aligning", () => {
mouse.up(100, 100);
// Add group to current selection
mouse.restorePosition(0, 0);
mouse.restorePosition(10, 0);
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.click();
});
@ -482,6 +489,7 @@ describe("aligning", () => {
// Select the nested group, the rectangle is already selected
mouse.reset();
Keyboard.withModifierKeys({ shift: true }, () => {
mouse.moveTo(10, 0);
mouse.click();
});
};

View File

@ -779,7 +779,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": 0,
"height": "0.00000",
"id": "id668",
"index": "a2",
"isDeleted": false,
@ -855,14 +855,14 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
[
100,
0,
"-0.00000",
],
],
},
"inserted": {
"endBinding": {
"elementId": "id665",
"focus": -0,
"focus": "0.00000",
"gap": 1,
},
"points": [
@ -918,6 +918,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
],
"startBinding": null,
"y": 0,
},
"inserted": {
"points": [
@ -927,14 +928,15 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
[
100,
0,
"-0.00000",
],
],
"startBinding": {
"elementId": "id664",
"focus": 0,
"focus": "-0.00000",
"gap": 1,
},
"y": "0.00000",
},
},
},

View File

@ -790,7 +790,7 @@ describe("textWysiwyg", () => {
freedraw.x + freedraw.width / 2,
freedraw.y + freedraw.height / 2,
);
console.log(JSON.stringify(h.elements));
const editor = await getTextEditor(textEditorSelector, true);
updateTextEditor(editor, "Hello World!");
Keyboard.exitTextEditor(editor);