Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fixed failing tests by adjusting click method.

TzeYiingd4b816a75272
diff --git a/studio/tests/pages/projects/LogPanel.test.js b/studio/tests/pages/projects/LogPanel.test.js
index 712aae79dbe..d3e6000d366 100644
--- a/studio/tests/pages/projects/LogPanel.test.js
+++ b/studio/tests/pages/projects/LogPanel.test.js
@@ -63,7 +63,7 @@ test('reset search filter', async () => {
test('timestamp from filter default value', async () => {
render(<LogPanel defaultFromValue="2022-01-18T10:43:39+0000" />)
- clickDropdown(await screen.findByText('Custom'))
+ userEvent.click(await screen.findByText('Custom'))
await screen.findByDisplayValue('2022-01-18T10:43:39+0000')
})
test('timestamp from filter', async () => {
@@ -72,7 +72,7 @@ test('timestamp from filter', async () => {
const dropdown = await screen.findByText(/Now/)
// click the dropdown
- clickDropdown(dropdown)
+ userEvent.click(dropdown)
// TODO: use screen.findByLabelText when https://github.com/supabase/ui/issues/310 is resolved
await screen.findByText('From')
diff --git a/studio/tests/pages/projects/logs.test.js b/studio/tests/pages/projects/logs.test.js
index 804e36b1b32..5a1d73a4db5 100644
--- a/studio/tests/pages/projects/logs.test.js
+++ b/studio/tests/pages/projects/logs.test.js
@@ -292,7 +292,7 @@ test('te= query param will populate the timestamp from input', async () => {
expect.stringContaining(`timestamp_end=${encodeURIComponent(unixMicro)}`)
)
})
- clickDropdown(await screen.findByText('Custom'))
+ userEvent.click(await screen.findByText('Custom'))
await screen.findByDisplayValue(isoString)
})
test('custom sql querying', async () => {