The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
chore(sdk): move setting cypress baseUrl to global beforeEach for sdk tests (#66308)
Nicolò Pretto3459c5344d2a
diff --git a/e2e/support/component-cypress.js b/e2e/support/component-cypress.jsindex f002662d08d..673c096b55b 100644--- a/e2e/support/component-cypress.js+++ b/e2e/support/component-cypress.js@@ -1,6 +1,12 @@import "./cypress";import { deleteConflictingCljsGlobals } from "metabase/embedding-sdk/test/delete-conflicting-cljs-globals";+import { METABASE_INSTANCE_URL } from "./helpers";+beforeEach(() => {deleteConflictingCljsGlobals();++ // Cypress doesn't allow setting the baseUrl in the component config+ // but all of our helpers expect it to be set.+ Cypress.config("baseUrl", METABASE_INSTANCE_URL);});diff --git a/e2e/support/helpers/embedding-sdk-testing/embedding-sdk-helpers.ts b/e2e/support/helpers/embedding-sdk-testing/embedding-sdk-helpers.tsindex 0b09a84e036..72870161881 100644--- a/e2e/support/helpers/embedding-sdk-testing/embedding-sdk-helpers.ts+++ b/e2e/support/helpers/embedding-sdk-testing/embedding-sdk-helpers.ts@@ -5,7 +5,6 @@ import { USERS } from "e2e/support/cypress_data";import {AUTH_PROVIDER_URL,JWT_SHARED_SECRET,- METABASE_INSTANCE_URL,activateToken,restore,updateSetting,@@ -73,8 +72,6 @@ export const mockAuthProviderAndJwtSignIn = (};export function signInAsAdminAndEnableEmbeddingSdk() {- Cypress.config("baseUrl", METABASE_INSTANCE_URL);-restore();cy.signInAsAdmin();@@ -90,8 +87,6 @@ export function signInAsAdminAndSetupGuestEmbedding({}: {token: "starter" | "pro-cloud" | "bleeding-edge";}) {- Cypress.config("baseUrl", METABASE_INSTANCE_URL);-restore();cy.signInAsAdmin();