UNPKG

e2ed

Version:

E2E testing framework over Playwright

24 lines (23 loc) 905 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getScreenshotMeta = void 0; const testStaticOptions_1 = require("../../context/testStaticOptions"); const useContext_1 = require("../../useContext"); const environment_1 = require("../environment"); /** * Get screenshot metadata. * @internal */ const getScreenshotMeta = ({ actualValue, description, expectedScreenshotId, options, }) => ({ actual: undefined, description, expected: expectedScreenshotId !== '' ? expectedScreenshotId : undefined, options, pageUrl: (0, useContext_1.getPlaywrightPage)().url(), pathToPack: (0, environment_1.getPathToPack)(), runLabel: (0, environment_1.getRunLabel)(), selector: actualValue.description, testStaticOptions: (0, testStaticOptions_1.getTestStaticOptions)(), timeInMs: Date.now(), }); exports.getScreenshotMeta = getScreenshotMeta;