MCPcopy Create free account
hub / github.com/Rello/analytics / createCapture

Function createCapture

tests/playwright/common.js:824–834  ·  view source on GitHub ↗
(page, config)

Source from the content-addressed store, hash-verified

822}
823
824function createCapture(page, config) {
825 const dir = artifactDir(config);
826 return async function capture(name) {
827 await fs.mkdir(dir, { recursive: true });
828 const safeName = sanitizeFileFragment(name);
829 const fileName = config.artifactFlat
830 ? `${sanitizeFileFragment(config.artifactPrefix)}_${safeName}.png`
831 : `${safeName}.png`;
832 await page.screenshot({ path: path.join(dir, fileName), fullPage: true });
833 };
834}
835
836module.exports = {
837 addReportDataRow,

Calls 2

artifactDirFunction · 0.85
sanitizeFileFragmentFunction · 0.85

Tested by

no test coverage detected