mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
[skip ci] Small updates to tests
This commit is contained in:
parent
55ba55fbbb
commit
1eecd9a56b
2 changed files with 13 additions and 2 deletions
|
@ -44,3 +44,14 @@ exports[`Test Linear Elements > Test bound text element > should resize and posi
|
||||||
"Online whiteboard
|
"Online whiteboard
|
||||||
collaboration made easy"
|
collaboration made easy"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`Test Linear Elements > Test bound text element > should wrap the bound text when arrow bound container moves 1`] = `
|
||||||
|
"Online whiteboard
|
||||||
|
collaboration made easy"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`Test Linear Elements > Test bound text element > should wrap the bound text when arrow bound container moves 2`] = `
|
||||||
|
"Online whiteboard
|
||||||
|
collaboration made
|
||||||
|
easy"
|
||||||
|
`;
|
||||||
|
|
|
@ -1227,7 +1227,7 @@ describe("Test Linear Elements", () => {
|
||||||
const textElement = h.elements[2] as ExcalidrawTextElementWithContainer;
|
const textElement = h.elements[2] as ExcalidrawTextElementWithContainer;
|
||||||
|
|
||||||
expect(arrow.endBinding?.elementId).toBe(rect.id);
|
expect(arrow.endBinding?.elementId).toBe(rect.id);
|
||||||
expect(arrow.width).toBe(400);
|
expect(arrow.width).toBeCloseTo(408, 0);
|
||||||
expect(rect.x).toBe(400);
|
expect(rect.x).toBe(400);
|
||||||
expect(rect.y).toBe(0);
|
expect(rect.y).toBe(0);
|
||||||
expect(
|
expect(
|
||||||
|
@ -1246,7 +1246,7 @@ describe("Test Linear Elements", () => {
|
||||||
mouse.downAt(rect.x, rect.y);
|
mouse.downAt(rect.x, rect.y);
|
||||||
mouse.moveTo(200, 0);
|
mouse.moveTo(200, 0);
|
||||||
mouse.upAt(200, 0);
|
mouse.upAt(200, 0);
|
||||||
expect(arrow.width).toBeCloseTo(204, 0);
|
expect(arrow.width).toBeCloseTo(207, 0);
|
||||||
expect(rect.x).toBe(200);
|
expect(rect.x).toBe(200);
|
||||||
expect(rect.y).toBe(0);
|
expect(rect.y).toBe(0);
|
||||||
expect(handleBindTextResizeSpy).toHaveBeenCalledWith(
|
expect(handleBindTextResizeSpy).toHaveBeenCalledWith(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue