Open phatpna opened 5 days ago
It seems that it enabled hot
reload? try disable it.
It seems that it enabled
hot
reload? try disable it.
i have tried many ways ( i I commented in images) but still can't solve
Could you please provide a minimal reproducible repo? So I can reproduce and debug the issue locally?
Could you please provide a minimal reproducible repo? So I can reproduce and debug the issue locally?
I'm so sorry, because this is a private repo, i use playwright in the same container with Web, i think maybe you are right. I still can't solve this, but i will try more ways about hot reload. Could you please give me some advices might cause the issue i got ? Thank you in advanced
My suggestion is that don't use develop mode
which is enabled hot
reload, but try preview mode
or production mode
instead.
❌ npm run dev ✅ npm run build + npm run preview
No matter which mode, please enable sourcemap
and no minify
for the source.
Or you can try vue component testing, see example: https://github.com/cenfun/playwright-ct-vue
Clear and concise description of the issue How to make the report contain only the original file and not the fake rendered file? This is my code to run test
` test.beforeEach(async ({ page }) => { await mockApi(page) await Promise.all([ page.coverage.startJSCoverage({ resetOnNavigation: false }), page.coverage.startCSSCoverage({ resetOnNavigation: false }) ]);
await page.goto('http://localhost:8080'); await page.waitForTimeout(5000); });
test.afterEach(async ({ page }) => { const [jsCoverage, cssCoverage] = await Promise.all([ page.coverage.stopJSCoverage(), page.coverage.stopCSSCoverage() ]);
const coverageData = [...jsCoverage, ...cssCoverage];
await addCoverageReport(coverageData, test.info());
});
test(' Test default showing on page ', async ({ page, mount }) => {
await page.goto('http://localhost:8080'); await page.waitForTimeout(5000); await page.getByRole('link', { name: 'Absence List' }).click(); } `
My playwright.config.ts file:
Example look like that:
does anyone know why there are 2 files like that, and is there a way I can get just the original file
Thanks in advance