From aa56b84411cbfb4d198a65937a78744cb5ec9bda Mon Sep 17 00:00:00 2001 From: Timofei Kachalov Date: Mon, 26 May 2025 14:44:50 +0400 Subject: [PATCH] Remove esbuild-related e2e --- e2e/test/compatibility.cy.spec.js | 59 ------------------- .../src/app/app-provider.tsx | 23 +++----- .../src/components/app-provider.tsx | 23 +++----- 3 files changed, 16 insertions(+), 89 deletions(-) diff --git a/e2e/test/compatibility.cy.spec.js b/e2e/test/compatibility.cy.spec.js index 44c9ebe..6bca730 100644 --- a/e2e/test/compatibility.cy.spec.js +++ b/e2e/test/compatibility.cy.spec.js @@ -68,64 +68,5 @@ const TIMEOUT_MS = 40000; cy.findByTestId("dashboard-grid").should("exist"); }); }); - - it("should download an Interactive Dashboard", () => { - cy.visit({ - url: "/interactive-dashboard", - }); - - expect(cy.findByTestId("embed-frame", {timeout: TIMEOUT_MS}).should("exist")); - cy.findByTestId("embed-frame", {timeout: TIMEOUT_MS}).within(() => { - cy.findByTestId("fixed-width-dashboard-header").within(() => { - // Different icons for 54 and 55 - cy.get('button svg.Icon-download, button svg.Icon-document').first().click(); - }); - - cy.readFile('cypress/downloads/E-commerce Insights.pdf', {timeout: TIMEOUT_MS}).should('exist'); - }); - }); - - it("should load a metabase locale", () => { - cy.visit({ - url: "/interactive-question?locale=es", - }); - - expect(cy.findByText('Tabla', {timeout: TIMEOUT_MS}).should("exist")); - }); - - it("should load a moment locale", () => { - const time = new Date('2025-01-01') - cy.clock(time, ['Date']) - - cy.visit({ - url: "/interactive-question?locale=es", - }); - - cy.findAllByTestId('cell-data').then((cells) => { - const texts = [...cells].map((el) => el.textContent); - expect(texts.join(' ')).to.include('febrero'); - expect(texts.join(' ')).to.include('mayo'); - }); - }); - - it("should load a dayjs locale", () => { - const time = new Date('2025-01-01') - cy.clock(time, ['Date']) - - cy.visit({ - url: "/interactive-question?locale=es", - }); - - cy.findByText('Filtro', {timeout: TIMEOUT_MS}).click(); - cy.get('[data-element-id="mantine-popover"]').within(() => { - cy.findByText('Created At').click(); - // Different texts for 54 and 55 - cy.findByText(/(Fechas específicas…|Rango de fechas fijo…)/).click(); - }) - - cy.findByTestId('date-filter-picker').within(() => { - cy.findByText('enero 2025').should('exist'); - }) - }); }); }); diff --git a/next-sample-app-router/src/app/app-provider.tsx b/next-sample-app-router/src/app/app-provider.tsx index e8bff8c..5debabe 100644 --- a/next-sample-app-router/src/app/app-provider.tsx +++ b/next-sample-app-router/src/app/app-provider.tsx @@ -1,6 +1,5 @@ "use client"; -import { useSearchParams } from 'next/navigation' import { MetabaseProvider, defineMetabaseAuthConfig, @@ -58,17 +57,11 @@ const theme = defineMetabaseTheme({ }, }); -export const AppProvider = ({children}: PropsWithChildren) => { - const searchParams = useSearchParams() - const locale = searchParams.get('locale') ?? undefined - - return ( - - {children} - - ) -} \ No newline at end of file +export const AppProvider = ({children}: PropsWithChildren) => ( + + {children} + +) \ No newline at end of file diff --git a/next-sample-pages-router/src/components/app-provider.tsx b/next-sample-pages-router/src/components/app-provider.tsx index 1c454bc..dc79f98 100644 --- a/next-sample-pages-router/src/components/app-provider.tsx +++ b/next-sample-pages-router/src/components/app-provider.tsx @@ -1,4 +1,3 @@ -import { useSearchParams } from 'next/navigation' import { MetabaseProvider, defineMetabaseAuthConfig, @@ -56,17 +55,11 @@ const theme = defineMetabaseTheme({ }, }); -export const AppProvider = ({children}: PropsWithChildren) => { - const searchParams = useSearchParams() - const locale = searchParams.get('locale') ?? undefined - - return ( - - {children} - - ) -} \ No newline at end of file +export const AppProvider = ({children}: PropsWithChildren) => ( + + {children} + +) \ No newline at end of file