mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 10:25:06 +03:00
* add basic feature * rename to datasource * rename elements in left sidebar * update copy in titles in left sidebar * Add optional 'enabled' parameter in useLogsQuery hook * Update warehouse query state and components * add template selector for warehouse query builder * update deprecated input compo * fix create token and console warnings * fix type errors * fix dupped import * update endpoints and add missing permissions * update queries with new api path * fix type errors * undo last commit * undo missing file * fix imports in logs page * import fixes * add settings link like in storage menu * sort imports, fix form submit * rename access tokens settings section * align dropdwn * add overflow to templates dropdown * add name as defaultvalue to udpate form * update rm collection dialog * capitalize * Update apps/studio/pages/project/[ref]/logs/explorer/index.tsx Co-authored-by: Joshen Lim <joshenlimek@gmail.com> * fix typo --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
31 lines
817 B
TypeScript
31 lines
817 B
TypeScript
import { vi } from 'vitest'
|
|
import { screen } from '@testing-library/react'
|
|
|
|
import { render } from 'tests/helpers'
|
|
import LogsQueryPanel from 'components/interfaces/Settings/Logs/LogsQueryPanel'
|
|
|
|
test('run and clear', async () => {
|
|
const mockRun = vi.fn()
|
|
const mockClear = vi.fn()
|
|
render(
|
|
<LogsQueryPanel
|
|
defaultFrom=""
|
|
defaultTo=""
|
|
isLoading={false}
|
|
onDateChange={() => {}}
|
|
onSelectSource={() => {}}
|
|
onSelectTemplate={() => {}}
|
|
warnings={[]}
|
|
onClear={mockClear}
|
|
hasEditorValue
|
|
warehouseCollections={[]}
|
|
dataSource="logs"
|
|
onDataSourceChange={() => {}}
|
|
templates={[]}
|
|
warehouseTemplates={[]}
|
|
onSelectWarehouseTemplate={() => {}}
|
|
/>
|
|
)
|
|
await expect(screen.findByPlaceholderText(/Search/)).rejects.toThrow()
|
|
})
|