The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
test(studio): re-enable TanStack redirect E2E tests (#51970)
Alaister Young6827b821dfb7
diff --git a/apps/studio/compat/next/router-navigation.test.tsx b/apps/studio/compat/next/router-navigation.test.tsxindex 5bcde04f540..a5f254e1087 100644--- a/apps/studio/compat/next/router-navigation.test.tsx+++ b/apps/studio/compat/next/router-navigation.test.tsx@@ -65,9 +65,11 @@ describe('Next router compatibility subscriptions', () => {it('updates route pattern, params, query and hash after pending navigation', async () => {const loaded = Promise.withResolvers<void>()+ const onRouterChange = vi.fn()function Layout() {const router = useRouter()+ useEffect(() => onRouterChange(router), [router])return (<><div data-testid="location">{router.asPath}</div>@@ -94,6 +96,7 @@ describe('Next router compatibility subscriptions', () => {})await router.load()const view = render(<RouterProvider router={router} />)+ expect(onRouterChange).toHaveBeenCalledTimes(1)try {let navigation: Promise<void> | undefined@@ -108,11 +111,26 @@ describe('Next router compatibility subscriptions', () => {expect(screen.getByTestId('location')).toHaveTextContent('/project/other/editor/42?schema=private#selection')+ expect(onRouterChange).toHaveBeenCalledTimes(2)+ expect(onRouterChange).toHaveBeenNthCalledWith(+ 2,+ expect.objectContaining({+ asPath: '/project/other/editor/42?schema=private#selection',+ })+ )await act(async () => {loaded.resolve()await navigation})+ expect(onRouterChange).toHaveBeenCalledTimes(3)+ expect(onRouterChange).toHaveBeenNthCalledWith(+ 3,+ expect.objectContaining({+ pathname: '/project/[ref]/editor/[id]',+ query: { ref: 'other', id: '42', schema: 'private' },+ })+ )expect(screen.getByTestId('pattern')).toHaveTextContent('/project/[ref]/editor/[id]')expect(JSON.parse(screen.getByTestId('query').textContent ?? '')).toEqual({ref: 'other',diff --git a/e2e/studio/env.config.ts b/e2e/studio/env.config.tsindex 7295aaa73db..10b13e97ab4 100644--- a/e2e/studio/env.config.ts+++ b/e2e/studio/env.config.ts@@ -22,7 +22,6 @@ export const env = {API_URL: process.env.API_URL || 'http://127.0.0.1:54321',IS_PLATFORM: toBoolean(process.env.IS_PLATFORM || 'false'),- STUDIO_FRAMEWORK: process.env.STUDIO_FRAMEWORK || 'next',EMAIL: process.env.EMAIL,PASSWORD: process.env.PASSWORD,PROJECT_REF: process.env.PROJECT_REF || undefined,diff --git a/e2e/studio/features/api-access-toggle.spec.ts b/e2e/studio/features/api-access-toggle.spec.tsindex 1d40dad4182..6a8e047d074 100644--- a/e2e/studio/features/api-access-toggle.spec.ts+++ b/e2e/studio/features/api-access-toggle.spec.ts@@ -1,6 +1,5 @@import { expect, Page } from '@playwright/test'-import { env } from '../env.config.js'import { dropTable, query } from '../utils/db/index.js'import { dismissToastsIfAny } from '../utils/dismiss-toast.js'import { openTableContextMenu } from '../utils/table-helpers.js'@@ -200,14 +199,6 @@ test.describe('API Access Toggle', () => {})test('shows Manage access link when editing an existing table', async ({ page, ref }) => {- // TODO(tanstack): the entity-types pg-meta query that waitForTableToLoad- // waits on consistently times out (>30s) under the TanStack Start server- // but not under Next — see PR #51141. Re-enable once the root cause is found.- test.skip(- env.STUDIO_FRAMEWORK === 'tanstack',- 'pg-meta entity-types query hangs under the TanStack Start server (#51141)'- )-const tableName = `${TABLE_NAME_PREFIX}_edit`await using _ = await withSetupCleanup(async () => {@@ -266,14 +257,6 @@ test.describe('API Access Toggle', () => {page,ref,}) => {- // TODO(tanstack): the entity-types pg-meta query that waitForTableToLoad- // waits on consistently times out (>30s) under the TanStack Start server- // but not under Next — see PR #51141. Re-enable once the root cause is found.- test.skip(- env.STUDIO_FRAMEWORK === 'tanstack',- 'pg-meta entity-types query hangs under the TanStack Start server (#51141)'- )-const tableName = `${TABLE_NAME_PREFIX}_preserve_grants`await using _ = await withSetupCleanup(async () => {diff --git a/e2e/studio/features/database.spec.ts b/e2e/studio/features/database.spec.tsindex 32913206ffa..81788848421 100644--- a/e2e/studio/features/database.spec.ts+++ b/e2e/studio/features/database.spec.ts@@ -540,14 +540,6 @@ test.describe('Database', () => {test.describe('Triggers', () => {test('actions works as expected', async ({ page, ref }) => {- // TODO(tanstack): triggers/entity-types pg-meta queries consistently- // time out (>30s) under the TanStack Start server but not under Next —- // see PR #51141. Re-enable once the root cause is found.- test.skip(- env.STUDIO_FRAMEWORK === 'tanstack',- 'pg-meta triggers query hangs under the TanStack Start server (#51141)'- )-const triggersLoadWait = createApiResponseWaiter(page, 'pg-meta', ref, 'query?key=triggers')await page.goto(toUrl(`/project/${env.PROJECT_REF}/database/triggers?schema=public`))@@ -572,14 +564,6 @@ test.describe('Database', () => {})test('CRUD operations works as expected', async ({ page, ref }) => {- // TODO(tanstack): triggers/entity-types pg-meta queries consistently- // time out (>30s) under the TanStack Start server but not under Next —- // see PR #51141. Re-enable once the root cause is found.- test.skip(- env.STUDIO_FRAMEWORK === 'tanstack',- 'pg-meta triggers query hangs under the TanStack Start server (#51141)'- )-const databaseTableName = 'pw_database_trigger_table'const databaseColumnName = 'pw_database_column_trigger'const databaseTriggerName = 'pw_database_trigger'