* add more date range options to log previewer * new ui for logs datepickers * update logsquerypanel * update previewfilterpanel * fix some bugs and add copypasting date range support * handle updating times in copypaste events * add handlepaste to timesplitinput * update warehouse datepicker * update reports datepicker * rm consolelog * update logsquerypanel * update tests * fix reportsfilterbar * update api-overview report * rm consolelogs * update storage report * add large range wraning * update large range max const * fix default values and label * fix tests * add default value to logs previewer * disable helpers fix * rm last 7 days helper * add test for disabled helpers * add label test * add helper label test * reset state when closing without saving * undo rm * fm datefns, fix test class * fix year format * rm disabled from label * fix type err in test * fix test * fix tests * max 2 days for warning * fix refresh not using latest timestamp end * refactor log explorer to use new logs datepicker state hook * Remove round to hour/day in helpers * Use now instead of end of day for datepicker TO * fix types * update global timeout for e2e tests * update test with new default * fix test * analytics container taking too long to return data so adding more timeout * force ci * fix first render issues * Smol refactor * Do not reset timestamp end when refreshing in LogsPreviewer --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
76 lines
2.2 KiB
TypeScript
76 lines
2.2 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
// See https://playwright.dev/docs/test-configuration.
|
|
|
|
export default defineConfig({
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
timeout: 20000,
|
|
reporter: 'html',
|
|
use: {
|
|
baseURL:
|
|
process.env.ENV === 'local'
|
|
? 'http://localhost:8082'
|
|
: process.env.ENV === 'staging'
|
|
? 'https://supabase.green/dashboard/'
|
|
: '',
|
|
trace: 'on-first-retry',
|
|
video: 'retain-on-failure',
|
|
launchOptions: {
|
|
env: {
|
|
NODE_ENV:
|
|
process.env.ENV === 'local' ? 'test' : process.env.ENV === 'staging' ? 'staging' : '',
|
|
},
|
|
},
|
|
},
|
|
projects: [
|
|
...(process.env.ENV !== 'local'
|
|
? [
|
|
{
|
|
name: 'Authentication setup',
|
|
testDir: './tests',
|
|
testMatch: /.*\.setup\.ts/,
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
name: 'Common Functionality',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
...(process.env.ENV !== 'local' ? { storageState: 'playwright/.auth/user.json' } : {}),
|
|
viewport: { width: 1366, height: 768 },
|
|
},
|
|
testDir: './tests/common-functionality',
|
|
dependencies: process.env.ENV !== 'local' ? ['Authentication setup'] : undefined,
|
|
},
|
|
...(process.env.ENV !== 'local'
|
|
? [
|
|
{
|
|
name: 'Production Functionality',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
storageState: 'playwright/.auth/user.json',
|
|
viewport: { width: 1366, height: 768 },
|
|
},
|
|
testDir: './tests/production-functionality',
|
|
dependencies: ['Authentication setup'],
|
|
},
|
|
]
|
|
: []),
|
|
],
|
|
/* Run your local dev server before starting the tests */
|
|
webServer:
|
|
process.env.ENV === 'local'
|
|
? {
|
|
// using npm run dev instead of turbo because turbo doesn't stop the server after a test (doesn't handle SIGTERM).
|
|
command: 'pnpm dev',
|
|
cwd: '../../apps/studio',
|
|
url: 'http://localhost:8082',
|
|
reuseExistingServer: !process.env.CI,
|
|
env: { NODE_ENV: 'test' },
|
|
}
|
|
: undefined,
|
|
})
|