fix fontFamily state updating (#1679)

This commit is contained in:
David Luzar 2020-05-29 21:59:39 +02:00 committed by GitHub
parent 44a88d2d58
commit 0db7ac78c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 78 additions and 1 deletions

View file

@ -840,4 +840,11 @@ describe("regression tests", () => {
mouse.doubleClick();
expect(getSelectedElements().length).toBe(1);
});
it("updates fontSize & fontFamily appState", () => {
clickTool("text");
expect(h.state.currentItemFontFamily).toEqual(1); // Virgil
fireEvent.click(screen.getByText(/code/i));
expect(h.state.currentItemFontFamily).toEqual(3); // Cascadia
});
});