diff --git a/playwright.global-setup.mjs b/playwright.global-setup.mjs index b4e14800..2db2bdbc 100644 --- a/playwright.global-setup.mjs +++ b/playwright.global-setup.mjs @@ -12,8 +12,6 @@ const runtimeNamespace = String(process.env.PLAYWRIGHT_ARTIFACT_NAMESPACE || `po .trim() .replace(/[^a-zA-Z0-9._-]+/g, "-"); const pidFile = path.resolve(process.cwd(), "output/playwright", `dev-server-${runtimeNamespace}.json`); -const posViewsDirectory = path.resolve(process.cwd(), "src/views/dashboards/departmentDashboard/modules/Pos"); -const shopComponentsDirectory = path.resolve(process.cwd(), "src/components/shop"); const serverOutputLimit = 80; async function getListeningProcessOnWindows(port) { @@ -243,38 +241,25 @@ async function waitForServerReady(url, serverProcess, stdoutLines, stderrLines, } async function buildWarmupTargets() { - const [posViewFiles, shopComponentFiles] = await Promise.all([ - fs.readdir(posViewsDirectory), - fs.readdir(shopComponentsDirectory), - ]); - return [ { pathname: "/admin/12/modules/pos?step=1", expectedContentType: "text/html" }, { pathname: "/admin/12/modules/pos/orders/54518", expectedContentType: "text/html" }, { pathname: "/@vite/client", expectedContentType: "javascript" }, { pathname: "/src/main.js", expectedContentType: "javascript" }, { pathname: "/src/router.js", expectedContentType: "javascript" }, - ...posViewFiles - .filter((fileName) => fileName.endsWith(".vue")) - .map((fileName) => ({ - pathname: `/src/views/dashboards/departmentDashboard/modules/Pos/${fileName}`, - expectedContentType: "javascript", - })), - ...shopComponentFiles - .filter((fileName) => fileName.endsWith(".vue")) - .map((fileName) => ({ - pathname: `/src/components/shop/${fileName}`, - expectedContentType: "javascript", - })), ]; } async function warmUpAsset(url, expectedContentType, timeoutMs = 120_000) { const deadline = Date.now() + timeoutMs; + const perRequestTimeoutMs = 10_000; while (Date.now() < deadline) { try { - const response = await fetch(url, { redirect: "manual" }); + const response = await fetch(url, { + redirect: "manual", + signal: AbortSignal.timeout(perRequestTimeoutMs), + }); const contentType = response.headers.get("content-type") || ""; if (response.ok && contentType.toLowerCase().includes(expectedContentType)) { @@ -318,7 +303,7 @@ export default async function globalSetup() { const serverProcess = process.platform === "win32" - ? spawn("cmd.exe", ["/d", "/s", "/c", `npm.cmd run dev -- --host ${devHost} --port ${devPort} --strictPort`], { + ? spawn("cmd.exe", ["/d", "/s", "/c", `npm.cmd run dev -- --force --host ${devHost} --port ${devPort} --strictPort`], { cwd: process.cwd(), detached: true, env: { @@ -328,7 +313,7 @@ export default async function globalSetup() { stdio: ["ignore", "pipe", "pipe"], windowsHide: true, }) - : spawn("npm", ["run", "dev", "--", "--host", devHost, "--port", String(devPort), "--strictPort"], { + : spawn("npm", ["run", "dev", "--", "--force", "--host", devHost, "--port", String(devPort), "--strictPort"], { cwd: process.cwd(), detached: true, env: { @@ -341,6 +326,7 @@ export default async function globalSetup() { const stderrLines = []; const stdoutReader = captureProcessOutput(serverProcess.stdout, stdoutLines); const stderrReader = captureProcessOutput(serverProcess.stderr, stderrLines); + serverProcess.unref(); await fs.writeFile(pidFile, JSON.stringify({ pid: serverProcess.pid, port: devPort }), "utf8"); diff --git a/src/components/models/navigation/items/NavigationMenuItemsSuperUser.vue b/src/components/models/navigation/items/NavigationMenuItemsSuperUser.vue index 5ece4377..37b2fc9c 100644 --- a/src/components/models/navigation/items/NavigationMenuItemsSuperUser.vue +++ b/src/components/models/navigation/items/NavigationMenuItemsSuperUser.vue @@ -283,7 +283,6 @@ const items = computed(() => [ { label: t('superuser.nav.department_lanes'), to: '/superuser/department/lanes'}, { label: t('superuser.nav.department_gates'), to: '/superuser/department/gates'}, { label: t('superuser.nav.department_relays'), to: '/superuser/department/relays'}, - { label: 'Edge Gateways', to: '/superuser/gateways'}, { label: t('superuser.nav.scanners'), to: '/superuser/scanners' }, { label: t('superuser.nav.selfserve'), to: '/superuser/selfserve' }, ]}, @@ -307,6 +306,7 @@ const items = computed(() => [ { label: firstToUpperCase(SessionUser.superUser.modules.licenseplaterecognizer.meta.labels.multiple), to: '/superuser/configuration/licenseplaterecognizer'}, { label: firstToUpperCase(SessionUser.superUser.modules.virkdata.meta.labels.multiple), to: '/superuser/configuration/virkdata'}, { label: firstToUpperCase(SessionUser.superUser.modules.shelly.meta.labels.multiple), to: '/superuser/configuration/shelly'}, + { label: firstToUpperCase(SessionUser.superUser.modules.edgegateway.meta.labels.multiple), to: '/superuser/configuration/edgegateway'}, { label: firstToUpperCase(SessionUser.superUser.modules.selfserve.meta.labels.multiple), to: '/superuser/configuration/selfserve'}, { label: firstToUpperCase(SessionUser.superUser.modules.bird.meta.labels.multiple), to: '/superuser/configuration/bird'}, ]}, diff --git a/src/features/edgeGateways/EdgeGatewayInventoryPage.vue b/src/features/edgeGateways/EdgeGatewayInventoryPage.vue index 29629dc6..c37e332b 100644 --- a/src/features/edgeGateways/EdgeGatewayInventoryPage.vue +++ b/src/features/edgeGateways/EdgeGatewayInventoryPage.vue @@ -1,4 +1,6 @@