UNPKG

e2ed

Version:

E2E testing framework over Playwright

18 lines (17 loc) 733 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.goPageHistory = void 0; const createClientFunction_1 = require("../../../createClientFunction"); const log_1 = require("../../../utils/log"); const goPageHistoryClient = (0, createClientFunction_1.createClientFunction)((delta) => window.history.go(delta), { name: 'goPageHistory', }); /** * Go delta steps in browser page history. */ const goPageHistory = async (page, delta) => { (0, log_1.log)(`Go ${delta} steps in browser history from page "${page.constructor.name}"`, undefined, 5 /* LogEventType.InternalAction */); await goPageHistoryClient(delta); await page.waitForPageLoaded(); }; exports.goPageHistory = goPageHistory;