mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 13:19:09 +03:00
chore: add failing test for expandable api request table
This commit is contained in:
1 parent
10b822d010
commit
f3722bd9b7
1 file changed
+13
@@ -26,3 +26,16 @@ test('refresh button', async () => {
|
||||
userEvent.click(await screen.findByText(/Refresh/))
|
||||
await waitFor(() => expect(get).toBeCalled())
|
||||
})
|
||||
|
||||
test('expandable tables', async () => {
|
||||
get.mockImplementation(async (_url) => [
|
||||
{ data: [{ timestamp: new Date().toISOString(), count: 123 }] },
|
||||
])
|
||||
const expandables = await screen.findByText('View API requests')
|
||||
const first = expandables[0]
|
||||
get.mockImplementationOnce(async (_url) => [{ data: [{ path: '/my-path', count: 22 }] }])
|
||||
userEvent.click(first)
|
||||
await screen.findByText('Hide API Requests')
|
||||
await screen.findByText(/\/my\-path/)
|
||||
await screen.findByText(/22/)
|
||||
})
|
||||
Reference in new issue
Block a user