MCPcopy Create free account
hub / github.com/DustinBrett/daedalOS / windowIsMaximized

Function windowIsMaximized

e2e/functions.ts:516–539  ·  view source on GitHub ↗
(
  { page }: TestProps,
  maximized = true
)

Source from the content-addressed store, hash-verified

514 ).toPass();
515
516export const windowIsMaximized = async (
517 { page }: TestProps,
518 maximized = true
519): Promise<void> =>
520 expect(async () =>
521 expect(
522 await page.evaluate(
523 ([windowSelector, taskbarSelector]) => {
524 const {
525 clientWidth: windowWidth = 0,
526 clientHeight: windowHeight = 0,
527 } = document.querySelector(windowSelector) || {};
528 const { clientHeight: taskbarHeight = 0 } =
529 document.querySelector(taskbarSelector) || {};
530
531 return (
532 windowWidth === window.innerWidth &&
533 windowHeight === window.innerHeight - taskbarHeight
534 );
535 },
536 [WINDOW_SELECTOR, TASKBAR_SELECTOR]
537 )
538 ).toBe(maximized)
539 ).toPass();
540
541// expect->locator
542export const canvasBackgroundIsHidden = async ({

Callers 2

Taskbar.spec.tsFile · 0.90
Window.spec.tsFile · 0.90

Calls 1

evaluateMethod · 0.45

Tested by

no test coverage detected