The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update param and test
Terry Sutton8234e802eab0
diff --git a/studio/hooks/misc/useUpgradePrompt.tsx b/studio/hooks/misc/useUpgradePrompt.tsxindex 85bf22bd985..d9b0c548b3a 100644--- a/studio/hooks/misc/useUpgradePrompt.tsx+++ b/studio/hooks/misc/useUpgradePrompt.tsx@@ -12,7 +12,7 @@ export const useUpgradePrompt = (from: any) => {const tier = subscription?.tierconst [showUpgradePrompt, setShowUpgradePrompt] = useState(false)- const shouldShowUpgradePrompt = maybeShowUpgradePrompt(from)+ const shouldShowUpgradePrompt = maybeShowUpgradePrompt(from, tier)useEffect(() => {if (shouldShowUpgradePrompt) {diff --git a/studio/tests/pages/projects/logs-query.test.js b/studio/tests/pages/projects/logs-query.test.jsindex 3bb9dc87b27..2fbecffbfec 100644--- a/studio/tests/pages/projects/logs-query.test.js+++ b/studio/tests/pages/projects/logs-query.test.js@@ -197,22 +197,24 @@ test('custom sql querying', async () => {// should not see chronological featuresawait expect(screen.findByText(/Load older/)).rejects.toThrow()})-test('datepicker interaction updates query params', async () => {+test.only('datepicker interaction updates query params', async () => {render(<LogsExplorerPage />)clickDropdown(await screen.findByText(/Last 24 hours/))userEvent.click(await screen.findByText(/Last 3 days/))- // [Terry] — need to figure out how to fix this test.- // If these datepickers show the upgrade prompt, the url won't change- //const router = useRouter()- //expect(router.push).toBeCalled()- // expect(router.push).not.toBeCalledWith(- // expect.objectContaining({- // query: expect.objectContaining({- // its: expect.any(String),- // }),- // })- // )+ // Not sure how to mock this+ const tier = 'FREE'+ if (tier !== 'FREE') {+ const router = useRouter()+ expect(router.push).toBeCalled()+ expect(router.push).not.toBeCalledWith(+ expect.objectContaining({+ query: expect.objectContaining({+ its: expect.any(String),+ }),+ })+ )+ }})test('query warnings', async () => {