Skip to content

Commit aa56b84

Browse files
committed
Remove esbuild-related e2e
1 parent 5298bbe commit aa56b84

File tree

3 files changed

+16
-89
lines changed

3 files changed

+16
-89
lines changed

e2e/test/compatibility.cy.spec.js

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -68,64 +68,5 @@ const TIMEOUT_MS = 40000;
6868
cy.findByTestId("dashboard-grid").should("exist");
6969
});
7070
});
71-
72-
it("should download an Interactive Dashboard", () => {
73-
cy.visit({
74-
url: "/interactive-dashboard",
75-
});
76-
77-
expect(cy.findByTestId("embed-frame", {timeout: TIMEOUT_MS}).should("exist"));
78-
cy.findByTestId("embed-frame", {timeout: TIMEOUT_MS}).within(() => {
79-
cy.findByTestId("fixed-width-dashboard-header").within(() => {
80-
// Different icons for 54 and 55
81-
cy.get('button svg.Icon-download, button svg.Icon-document').first().click();
82-
});
83-
84-
cy.readFile('cypress/downloads/E-commerce Insights.pdf', {timeout: TIMEOUT_MS}).should('exist');
85-
});
86-
});
87-
88-
it("should load a metabase locale", () => {
89-
cy.visit({
90-
url: "/interactive-question?locale=es",
91-
});
92-
93-
expect(cy.findByText('Tabla', {timeout: TIMEOUT_MS}).should("exist"));
94-
});
95-
96-
it("should load a moment locale", () => {
97-
const time = new Date('2025-01-01')
98-
cy.clock(time, ['Date'])
99-
100-
cy.visit({
101-
url: "/interactive-question?locale=es",
102-
});
103-
104-
cy.findAllByTestId('cell-data').then((cells) => {
105-
const texts = [...cells].map((el) => el.textContent);
106-
expect(texts.join(' ')).to.include('febrero');
107-
expect(texts.join(' ')).to.include('mayo');
108-
});
109-
});
110-
111-
it("should load a dayjs locale", () => {
112-
const time = new Date('2025-01-01')
113-
cy.clock(time, ['Date'])
114-
115-
cy.visit({
116-
url: "/interactive-question?locale=es",
117-
});
118-
119-
cy.findByText('Filtro', {timeout: TIMEOUT_MS}).click();
120-
cy.get('[data-element-id="mantine-popover"]').within(() => {
121-
cy.findByText('Created At').click();
122-
// Different texts for 54 and 55
123-
cy.findByText(/(Fechas específicas|Rango de fechas fijo)/).click();
124-
})
125-
126-
cy.findByTestId('date-filter-picker').within(() => {
127-
cy.findByText('enero 2025').should('exist');
128-
})
129-
});
13071
});
13172
});

next-sample-app-router/src/app/app-provider.tsx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use client";
22

3-
import { useSearchParams } from 'next/navigation'
43
import {
54
MetabaseProvider,
65
defineMetabaseAuthConfig,
@@ -58,17 +57,11 @@ const theme = defineMetabaseTheme({
5857
},
5958
});
6059

61-
export const AppProvider = ({children}: PropsWithChildren) => {
62-
const searchParams = useSearchParams()
63-
const locale = searchParams.get('locale') ?? undefined
64-
65-
return (
66-
<MetabaseProvider
67-
authConfig={authConfig}
68-
theme={theme}
69-
locale={locale}
70-
>
71-
{children}
72-
</MetabaseProvider>
73-
)
74-
}
60+
export const AppProvider = ({children}: PropsWithChildren) => (
61+
<MetabaseProvider
62+
authConfig={authConfig}
63+
theme={theme}
64+
>
65+
{children}
66+
</MetabaseProvider>
67+
)

next-sample-pages-router/src/components/app-provider.tsx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useSearchParams } from 'next/navigation'
21
import {
32
MetabaseProvider,
43
defineMetabaseAuthConfig,
@@ -56,17 +55,11 @@ const theme = defineMetabaseTheme({
5655
},
5756
});
5857

59-
export const AppProvider = ({children}: PropsWithChildren) => {
60-
const searchParams = useSearchParams()
61-
const locale = searchParams.get('locale') ?? undefined
62-
63-
return (
64-
<MetabaseProvider
65-
authConfig={authConfig}
66-
theme={theme}
67-
locale={locale}
68-
>
69-
{children}
70-
</MetabaseProvider>
71-
)
72-
}
58+
export const AppProvider = ({children}: PropsWithChildren) => (
59+
<MetabaseProvider
60+
authConfig={authConfig}
61+
theme={theme}
62+
>
63+
{children}
64+
</MetabaseProvider>
65+
)

0 commit comments

Comments
 (0)