Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/tests/deps.ts>Page#emulateIdleState

The next-gen web framework.
Extremely Popular
Go to Latest
method Page.prototype.emulateIdleState
Re-export
import { Page } from "https://deno.land/x/fresh@1.5.4/tests/deps.ts";

Emulates the idle state. If no arguments set, clears idle state emulation.

Examples

Example 1

// set idle emulation
await page.emulateIdleState({isUserActive: true, isScreenUnlocked: false});

// do some checks here
...

// clear idle emulation
await page.emulateIdleState();

Parameters

optional
overrides: { isUserActive: boolean; isScreenUnlocked: boolean; }
  • Mock idle state. If not set, clears idle overrides

Returns

Promise<void>