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

Function createCapture

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

Source from the content-addressed store, hash-verified

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

Calls 2

artifactDirFunction · 0.85
sanitizeFileFragmentFunction · 0.85

Tested by

no test coverage detected