Warm smoke route chunks before Playwright runs

This commit is contained in:
Jeppe Bundgaard
2026-05-11 03:47:05 +02:00
parent 10a52521d5
commit 31e72af9bf
+15
View File
@@ -392,6 +392,18 @@ async function warmUpDevServer(url) {
"/src/views/dashboards/departmentDashboard/modules/self-serve/DepartmentSelfServeStudio.vue",
"/src/views/guest/book/GuestBookExteriorWash.vue",
];
const smokeRouteEntryModules = [
{ path: "/src/components/page/wrappers/LayoutV2.vue", depth: 2 },
{ path: "/src/views/pages/LandingPage.vue", depth: 2 },
{ path: "/src/views/dashboards/superUserDashboard/selfserve/EdgeAgents.vue", depth: 1 },
{ path: "/src/features/edgeGateways/EdgeGatewayManager.vue", depth: 2 },
{ path: "/src/features/edgeGateways/EdgeGatewayTerminalPage.vue", depth: 2 },
{ path: "/src/views/dashboards/superUserDashboard/department/DepartmentGatewaysWorkspacePage.vue", depth: 1 },
{ path: "/src/features/edgeGateways/EdgeGatewayDepartmentWorkspace.vue", depth: 2 },
{ path: "/src/views/dashboards/superUserDashboard/CollectedOrderInvoices.vue", depth: 1 },
{ path: "/src/views/dashboards/superUserDashboard/invoiceDistribution/InvoiceDistributionOverview.vue", depth: 2 },
{ path: "/src/views/dashboards/superUserDashboard/invoiceDistribution/InvoiceDistributionMonthView.vue", depth: 2 },
];
for (const target of warmupTargets) {
await warmUpAsset(new URL(target.pathname, url).toString(), target.expectedContentType);
@@ -401,6 +413,9 @@ async function warmUpDevServer(url) {
for (const entryModule of selfServeEntryModules) {
await warmModuleGraph(new URL(entryModule, url).toString(), { depth: 2 });
}
for (const { path: entryModule, depth } of smokeRouteEntryModules) {
await warmModuleGraph(new URL(entryModule, url).toString(), { depth });
}
await new Promise((resolve) => setTimeout(resolve, 1000));
}