UNPKG

e2ed

Version:

E2E testing framework over Playwright

15 lines (14 loc) 556 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resizeWindow = void 0; const useContext_1 = require("../useContext"); const log_1 = require("../utils/log"); /** * Set the browser window size. */ const resizeWindow = async (width, height) => { (0, log_1.log)(`Set the browser window size to width ${width} and height ${height}`, 5 /* LogEventType.InternalAction */); const page = (0, useContext_1.getPlaywrightPage)(); await page.setViewportSize({ height, width }); }; exports.resizeWindow = resizeWindow;