|
|
|
@ -223,6 +223,20 @@ describe("textWysiwyg", () => {
|
|
|
|
|
expect(h.state.editingElement?.id).toBe(text.id);
|
|
|
|
|
expect(h.elements.length).toBe(1);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// FIXME too flaky. No one knows why.
|
|
|
|
|
it.skip("should bump the version of a labeled arrow when the label is updated", async () => {
|
|
|
|
|
const arrow = UI.createElement("arrow", {
|
|
|
|
|
width: 300,
|
|
|
|
|
height: 0,
|
|
|
|
|
});
|
|
|
|
|
await UI.editText(arrow, "Hello");
|
|
|
|
|
const { version } = arrow;
|
|
|
|
|
|
|
|
|
|
await UI.editText(arrow, "Hello\nworld!");
|
|
|
|
|
|
|
|
|
|
expect(arrow.version).toEqual(version + 1);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("Test container-unbound text", () => {
|
|
|
|
@ -1506,18 +1520,4 @@ describe("textWysiwyg", () => {
|
|
|
|
|
expect(text.text).toBe("Excalidraw");
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("should bump the version of a labeled arrow when the label is updated", async () => {
|
|
|
|
|
await render(<Excalidraw handleKeyboardGlobally={true} />);
|
|
|
|
|
const arrow = UI.createElement("arrow", {
|
|
|
|
|
width: 300,
|
|
|
|
|
height: 0,
|
|
|
|
|
});
|
|
|
|
|
await UI.editText(arrow, "Hello");
|
|
|
|
|
const { version } = arrow;
|
|
|
|
|
|
|
|
|
|
await UI.editText(arrow, "Hello\nworld!");
|
|
|
|
|
|
|
|
|
|
expect(arrow.version).toEqual(version + 1);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|