mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-10-24 08:24:32 +02:00
refactor device to editor interface and derive styles panel
This commit is contained in:
@@ -18,26 +18,25 @@ describe("Test MobileMenu", () => {
|
||||
beforeEach(async () => {
|
||||
await render(<ExcalidrawApp />);
|
||||
// @ts-ignore
|
||||
h.app.refreshViewportBreakpoints();
|
||||
// @ts-ignore
|
||||
h.app.refreshEditorBreakpoints();
|
||||
h.app.refreshEditorInterface();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
restoreOriginalGetBoundingClientRect();
|
||||
});
|
||||
|
||||
it("should set device correctly", () => {
|
||||
expect(h.app.device).toMatchInlineSnapshot(`
|
||||
it("should set editor interface correctly", () => {
|
||||
expect(h.app.editorInterface).toMatchInlineSnapshot(`
|
||||
{
|
||||
"editor": {
|
||||
"canFitSidebar": false,
|
||||
"isMobile": true,
|
||||
},
|
||||
"canFitSidebar": false,
|
||||
"desktopUIMode": "full",
|
||||
"formFactor": "phone",
|
||||
"isLandscape": true,
|
||||
"isTouchScreen": false,
|
||||
"viewport": {
|
||||
"isLandscape": true,
|
||||
"isMobile": true,
|
||||
"userAgent": {
|
||||
"isMobileDevice": false,
|
||||
"platform": "other",
|
||||
"raw": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/22.1.0",
|
||||
},
|
||||
}
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user