e2ed
Version:
E2E testing framework over Playwright
18 lines (17 loc) • 930 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Screenshot = void 0;
/**
* Renders screenshot of test in HTML report.
* This base client function should not use scope variables (except other base functions).
* @internal
*/
const Screenshot = ({ dimensions, name, open = false, url }) => {
const withDimensions = dimensions ? ` (${dimensions})` : '';
const nameWithDimensions = name + withDimensions;
return (jsx.createElement("details", { class: "step-attachment", open: open },
jsx.createElement("summary", { class: "step-attachment__title" }, nameWithDimensions),
jsx.createElement("button", { class: "step__screenshot-button", type: "button", "aria-haspopup": "dialog", "aria-label": "Open full size screenshot" },
jsx.createElement("img", { src: url, alt: nameWithDimensions, title: nameWithDimensions }))));
};
exports.Screenshot = Screenshot;