Keep errors, elements and comments consistent (#2340)

Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
Lipis 2020-11-05 19:06:18 +02:00 committed by GitHub
parent 2a20c44338
commit 5d295415db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 96 additions and 98 deletions

View file

@ -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);

View file

@ -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,
},

View file

@ -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();