* Set up E2E tests for staging * update * Update * Update .env.staging.example * Fix node modules * Fix * Attempt to swap local-studio-tests to use the new studio-tests directory * Omit storage state if running tests for local self host * Fix test:local command * Deprecate local-studio-test folder * Rename local studio tests GH action to E2E test
26 lines
582 B
TypeScript
26 lines
582 B
TypeScript
import { test as base } from '@playwright/test'
|
|
import dotenv from 'dotenv'
|
|
import path from 'path'
|
|
|
|
dotenv.config({
|
|
path: path.resolve(__dirname, process.env.ENV === 'staging' ? '../.env.staging' : ''),
|
|
override: true,
|
|
})
|
|
|
|
export interface TestOptions {
|
|
env: string
|
|
ref: string
|
|
apiUrl: string
|
|
}
|
|
|
|
export const test = base.extend<TestOptions>({
|
|
env: process.env.ENV,
|
|
ref: process.env.PROJECT_REF,
|
|
apiUrl:
|
|
process.env.ENV === 'local'
|
|
? 'http://localhost:8082/api'
|
|
: process.env.ENV === 'staging'
|
|
? 'https://api.supabase.green'
|
|
: '',
|
|
})
|