UNPKG

e2ed

Version:

E2E testing framework over Playwright

21 lines (20 loc) 789 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.navigateToUrl = void 0; const useContext_1 = require("../useContext"); const log_1 = require("../utils/log"); /** * Navigate to the `url` (without waiting of interface stabilization). */ const navigateToUrl = async (url, options = {}) => { const { skipLogs = false } = options; if (skipLogs !== true) { (0, log_1.log)(`Will navigate to the url ${url}`, options, 5 /* LogEventType.InternalAction */); } const page = (0, useContext_1.getPlaywrightPage)(); await page.goto(url, options); if (skipLogs !== true) { (0, log_1.log)(`Navigation to the url ${url} completed`, options, 5 /* LogEventType.InternalAction */); } }; exports.navigateToUrl = navigateToUrl;