Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

E2E: Fix frontend port check. Adjust setting visibility (#68964)

Stas Gavrylovf23b210cf1fa
diff --git a/.env.example b/.env.example
index e271ad702ad..cf76e02cf6b 100644
--- a/.env.example
+++ b/.env.example
@@ -118,6 +118,9 @@ MB_EDITION="ee"
# MB_JETTY_HOST="localhost"
# MB_JETTY_PORT=4000
+# Frontend dev server port (for hot reload). Must match the port used by `yarn build-hot`.
+# MB_FRONTEND_DEV_PORT=8080
+
# 3.2 E2E Local Runner Setup
# ------------------------------------------------------------------------------
diff --git a/e2e/runner/run_cypress_local.ts b/e2e/runner/run_cypress_local.ts
index 8e7866575f8..4cad3ead39e 100644
--- a/e2e/runner/run_cypress_local.ts
+++ b/e2e/runner/run_cypress_local.ts
@@ -103,14 +103,17 @@ const init = async () => {
shell("echo 'Existing snapshots:' && ls -1 e2e/snapshots");
}
- const isFrontendRunning = shell("lsof -ti:8080 || echo ''", { quiet: true });
+ const frontendPort = process.env.MB_FRONTEND_DEV_PORT || 8080;
+ const isFrontendRunning = shell(`lsof -ti:${frontendPort} || echo ''`, {
+ quiet: true,
+ });
if (
!isFrontendRunning &&
options.CYPRESS_TESTING_TYPE === "e2e" &&
!runningFromJar
) {
printBold(
- "⚠️⚠️ You don't have your frontend running. You should probably run yarn build-hot ⚠️⚠️",
+ `⚠️⚠️ You don't have your frontend running on port ${frontendPort}. You should probably run yarn build-hot ⚠️⚠️`,
);
}