e2ed
Version:
E2E testing framework over Playwright
17 lines (16 loc) • 709 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.backPageHistory = void 0;
const createClientFunction_1 = require("../../../createClientFunction");
const step_1 = require("../../../step");
const backPageHistoryClient = (0, createClientFunction_1.createClientFunction)(() => window.history.back(), {
name: 'backPageHistory',
});
/**
* Go back in browser page history.
*/
const backPageHistory = (page) => (0, step_1.step)(`Go back in browser history from page "${page.constructor.name}"`, async () => {
await backPageHistoryClient();
await page.waitForPageLoaded();
}, { type: 5 /* LogEventType.InternalAction */ });
exports.backPageHistory = backPageHistory;