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

Function createCapture

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

Source from the content-addressed store, hash-verified

805}
806
807function createCapture(page, config) {
808 const dir = artifactDir(config);
809 return async function capture(name) {
810 await fs.mkdir(dir, { recursive: true });
811 const safeName = sanitizeFileFragment(name);
812 const fileName = config.artifactFlat
813 ? `${sanitizeFileFragment(config.artifactPrefix)}_${safeName}.png`
814 : `${safeName}.png`;
815 await page.screenshot({ path: path.join(dir, fileName), fullPage: true });
816 };
817}
818
819module.exports = {
820 addReportDataRow,

Callers 15

21_filter.jsFile · 0.85
23_sort.jsFile · 0.85
22_drilldown.jsFile · 0.85
29_group_top_n.jsFile · 0.85

Calls 2

artifactDirFunction · 0.85
sanitizeFileFragmentFunction · 0.85

Tested by

no test coverage detected