UNPKG

e2ed

Version:

E2E testing framework over Playwright

27 lines (26 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderScriptConstants = void 0; const internal_1 = require("../../../constants/internal"); const config_1 = require("../../config"); const client_1 = require("../client"); const locator_1 = require("./locator"); /** * Renders JS constants for report page. * @internal */ const renderScriptConstants = () => { const { pathToScreenshotsDirectoryForReport } = (0, config_1.getFullPackConfig)(); const reportClientState = { fullTestRuns: [], internalDirectoryName: internal_1.INTERNAL_DIRECTORY_NAME, lengthOfReadedJsonReportDataParts: 0, pathToScreenshotsDirectoryForReport, readJsonReportDataObservers: [], }; return (0, client_1.createSafeHtmlWithoutSanitize) ` const createLocatorOptions = ${JSON.stringify(locator_1.createLocatorOptions)}; var locator; const reportClientState = ${JSON.stringify(reportClientState)};`; }; exports.renderScriptConstants = renderScriptConstants;