mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Keep errors, elements and comments consistent (#2340)
Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
parent
2a20c44338
commit
5d295415db
22 changed files with 96 additions and 98 deletions
|
@ -68,7 +68,7 @@ describe("element binding", () => {
|
|||
expect(API.getSelectedElement().type).toBe("arrow");
|
||||
|
||||
// NOTE this mouse down/up + await needs to be done in order to repro
|
||||
// the issue, due to https://github.com/excalidraw/excalidraw/blob/46bff3daceb602accf60c40a84610797260fca94/src/components/App.tsx#L740
|
||||
// the issue, due to https://github.com/excalidraw/excalidraw/blob/46bff3daceb602accf60c40a84610797260fca94/src/components/App.tsx#L740
|
||||
mouse.reset();
|
||||
expect(h.state.editingLinearElement).not.toBe(null);
|
||||
mouse.down(0, 0);
|
||||
|
|
|
@ -19,7 +19,7 @@ const testElements = [
|
|||
text: "😀",
|
||||
}),
|
||||
// can't get jsdom text measurement to work so this is a temp hack
|
||||
// to ensure the element isn't stripped as invisible
|
||||
// to ensure the element isn't stripped as invisible
|
||||
width: 16,
|
||||
height: 16,
|
||||
},
|
||||
|
|
|
@ -1569,7 +1569,7 @@ it(
|
|||
expect(API.getSelectedElements().length).toBe(3);
|
||||
|
||||
// clicking on first rectangle that is part of the group should select
|
||||
// that group (exclusively)
|
||||
// that group (exclusively)
|
||||
mouse.clickOn(rect1);
|
||||
expect(API.getSelectedElements().length).toBe(2);
|
||||
expect(Object.keys(h.state.selectedGroupIds).length).toBe(1);
|
||||
|
@ -1594,8 +1594,7 @@ it(
|
|||
mouse.up(100, 100);
|
||||
|
||||
// Select first rectangle while keeping third one selected.
|
||||
// Third rectangle is selected because it was the last element
|
||||
// to be created.
|
||||
// Third rectangle is selected because it was the last element to be created.
|
||||
mouse.reset();
|
||||
Keyboard.withModifierKeys({ shift: true }, () => {
|
||||
mouse.click();
|
||||
|
@ -1616,8 +1615,7 @@ it(
|
|||
});
|
||||
expect(API.getSelectedElements().length).toBe(3);
|
||||
|
||||
// pointer down o first rectangle that is
|
||||
// part of the group
|
||||
// Pointer down o first rectangle that is part of the group
|
||||
mouse.reset();
|
||||
Keyboard.withModifierKeys({ shift: true }, () => {
|
||||
mouse.down();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue