The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fixed failing tests, extended tests to cover monaco command
TzeYiingd54a156a9158
diff --git a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsxindex 8f4d6a1e93a..fcf4e3a3d99 100644--- a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx+++ b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx@@ -18,12 +18,13 @@ import {} from '.'import DatePickers from './Logs.DatePickers'import Link from 'next/link'+import React from 'react'interface Props {templates?: LogTemplate[]onSelectTemplate: (template: LogTemplate) => voidonSelectSource: (source: LogsTableName) => void- onRun: () => void+ onRun: (e: React.MouseEvent<HTMLButtonElement>) => voidonClear: () => voidonSave?: () => voidhasEditorValue: booleandiff --git a/studio/pages/project/[ref]/logs-explorer/index.tsx b/studio/pages/project/[ref]/logs-explorer/index.tsxindex b62f1fd4a23..cb8978d5f24 100644--- a/studio/pages/project/[ref]/logs-explorer/index.tsx+++ b/studio/pages/project/[ref]/logs-explorer/index.tsx@@ -74,9 +74,9 @@ export const LogsExplorerPage: NextPage = () => {})}- const handleRun = (value?: string) => {- const query = value || editorValue- if (value) {+ const handleRun = (value?: string | React.MouseEvent<HTMLButtonElement>) => {+ const query = typeof value === 'string' ? (value || editorValue) : editorValue+ if (value && typeof value === 'string') {setEditorValue(value)}changeQuery(query)diff --git a/studio/tests/pages/projects/logs-query.test.js b/studio/tests/pages/projects/logs-query.test.jsindex a08cf7ba040..e0b8faa91da 100644--- a/studio/tests/pages/projects/logs-query.test.js+++ b/studio/tests/pages/projects/logs-query.test.js@@ -154,8 +154,11 @@ test('custom sql querying', async () => {// type new queryuserEvent.type(editor, 'select \ncount(*) as my_count \nfrom edge_logs')- // should trigger query+ // run query by buttonuserEvent.click(await screen.findByText('Run'))++ // run query by editor+ userEvent.type(editor, '\nlimit 123{ctrl}{enter}')await waitFor(() => {expect(get).toHaveBeenCalledWith(expect.stringContaining(encodeURI('\n')))@@ -163,10 +166,12 @@ test('custom sql querying', async () => {expect(get).toHaveBeenCalledWith(expect.stringContaining('select'))expect(get).toHaveBeenCalledWith(expect.stringContaining('edge_logs'))expect(get).not.toHaveBeenCalledWith(expect.stringContaining('where'))+ expect(get).not.toHaveBeenCalledWith(expect.stringContaining(encodeURIComponent("limit 123")))},{ timeout: 1000 })+await screen.findByText(/my_count/) //column headerconst rowValue = await screen.findByText(/12345/) // row value