updated loading on tests

This commit is contained in:
Ali Waseem committed 2026-02-05 15:20:15 -07:00
1 parent 2b3899c4d0
commit ac2e9c836b
3 files changed
+10 -3

No files matched your search

@@ -467,6 +467,12 @@ test.describe('API Access Toggle', () => {
}) => {
const tableName = `${TABLE_NAME_PREFIX}_preserve_grants`
await runSQL(page, ref, `DROP TABLE IF EXISTS ${tableName} CASCADE;`)
let loadPromise = waitForTableToLoad(page, ref)
await page.goto(toUrl(`/project/${ref}/editor?schema=public`))
await loadPromise
// Step 1: Create a table with partial privileges (only SELECT and INSERT for anon)
await page.getByRole('button', { name: 'New table', exact: true }).click()
await expect(page.getByTestId('table-editor-side-panel')).toBeVisible()
@@ -514,7 +520,7 @@ test.describe('API Access Toggle', () => {
})
// Navigate back to table editor
let loadPromise = waitForTableToLoad(page, ref)
loadPromise = waitForTableToLoad(page, ref)
await page.goto(toUrl(`/project/${ref}/editor?schema=public`))
await loadPromise
@@ -311,6 +311,7 @@ test.describe('Queue Table Operations', () => {
await expect(page.getByRole('dialog').getByText('Pending changes')).toBeVisible()
await page.keyboard.press('ControlOrMeta+.')
await expect(page.getByRole('dialog').getByText('Pending changes')).not.toBeVisible()
await expect(page.getByRole('button', { name: 'View Details' })).toBeVisible()
await page.keyboard.press('ControlOrMeta+s')
+2 -2
View File
@@ -13,11 +13,11 @@ export const runSQL = async (page: Page, ref: string, sql: string) => {
await page.getByTestId('sql-run-button').click()
const confirmButton = page.getByRole('button', { name: 'Run this query' })
if (await confirmButton.isVisible({ timeout: 1000 }).catch(() => false)) {
if (await confirmButton.isVisible({ timeout: 3000 }).catch(() => false)) {
await confirmButton.click()
}
await expect(
page.getByText('Success. No rows returned').or(page.getByText(/^\d+ rows?$/)).first()
).toBeVisible()
).toBeVisible({ timeout: 30000 })
}