mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
updated loading on tests
This commit is contained in:
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')
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
Reference in new issue
Block a user