mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: add tests for LogsPreviewer
This commit is contained in:
1 parent
e15dbd9fa1
commit
5edb78f6b4
1 file changed
+30
@@ -393,3 +393,33 @@ test('filters accept filterOverride', async () => {
|
||||
expect(get).toHaveBeenCalledWith(expect.stringContaining('myvalue'))
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
describe.each(['FREE', 'PRO', 'ENTERPRISE'])(
|
||||
'upgrade modal for %s',
|
||||
(key) => {
|
||||
beforeEach(() => {
|
||||
useProjectSubscription.mockReturnValue({
|
||||
subscription: {
|
||||
tier: {
|
||||
supabase_prod_id: `tier_${key.toLocaleLowerCase()}`,
|
||||
key
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
test('based on query params', async () => {
|
||||
const router = defaultRouterMock()
|
||||
router.query = {
|
||||
...router.query,
|
||||
q: 'some_query',
|
||||
its: dayjs().subtract(4, 'months').toISOString(),
|
||||
ite: dayjs().toISOString(),
|
||||
}
|
||||
useRouter.mockReturnValue(router)
|
||||
render(<LogsExplorerPage />)
|
||||
await screen.findByText('Log retention') // assert modal title is present
|
||||
})
|
||||
}
|
||||
)
|
||||
Reference in new issue
Block a user