mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 10:02:27 -04:00
* Fixed Type errors * Organizing testing utilities * Added Database checks to the onboarding flow * Updated Onboarding flow Changed type ChildrenExpectation so that it can be used for database verification * Added compatibility page setup Added more compatibility questions * Fix * . * Fix: Typo * Fix: Faker usernames can no longer generate symbols * Fix: Changed how work area is verified * . * . * Fix: Trying to work in headed mode * Fix: Change back to headless * Fix: Added timeout after workArea selection * . * Clean e2e * Improve E2E setup * Prettier * Log * Fix: should pull test account from unique identifier like email, username or id; not the display name * Source env vars in playwright directly * Clean e2e data * Clean test account id to be the same for email and username * Fix import warning * Add error handling * Add log * Temp remove env load * Update * Add logs and safeguards against using remote supabase during e2e tests * Fix playwright report path in C@ * Remove locale log * Check if userInformationFromDb loading with name instead of username was the issue * Remove login log * Check if initial work area names were the issue * Ignore if no files found * Cache Firebase emulators in CI * Reload env vars in playwright * It did not break tests... * Clean verifyWorkArea * Add caching for node modules in CI * Add caching for node modules in CI (2) * Do not raise if emulator not running during db seed * Do not raise if using firebase emulator * Fix supabase cache in CI * Add Cache Playwright browsers in CI * Fix * Test cache * Turn off unused supabase services to speed things up * Back to good one * Set CI=true * api is required for client connection * Add safeguards for missing supabase env vars * Remove echo * Remove supabase cache --------- Co-authored-by: Martin Braquet <martin.braquet@gmail.com>
62 lines
2.0 KiB
TypeScript
62 lines
2.0 KiB
TypeScript
import {test as base} from '@playwright/test'
|
|
|
|
import {AuthPage} from '../pages/AuthPage'
|
|
import {ComatibilityPage} from '../pages/compatibilityPage'
|
|
import {HomePage} from '../pages/homePage'
|
|
import {OnboardingPage} from '../pages/onboardingPage'
|
|
import {ProfilePage} from '../pages/profilePage'
|
|
import {SignUpPage} from '../pages/signUpPage'
|
|
import {onboarding, OnboardingUser} from '../utils/accountInformation'
|
|
import {deleteUser} from '../utils/deleteUser'
|
|
|
|
export const test = base.extend<{
|
|
homePage: HomePage
|
|
onboardingPage: OnboardingPage
|
|
signUpPage: SignUpPage
|
|
profilePage: ProfilePage
|
|
authPage: AuthPage
|
|
compatabilityPage: ComatibilityPage
|
|
cleanUpUsers: void
|
|
testAccount: OnboardingUser
|
|
fakerAccount: OnboardingUser
|
|
}>({
|
|
testAccount: async ({}, use) => {
|
|
const account = onboarding.account_one() // email captured here
|
|
await use(account)
|
|
console.log('Cleaning up onboarding 1 account...')
|
|
await deleteUser(account.email, account.password) // same account, guaranteed
|
|
},
|
|
fakerAccount: async ({}, use) => {
|
|
const account = onboarding.faker_account() // email captured here
|
|
await use(account)
|
|
console.log('Cleaning up faker account...')
|
|
await deleteUser(account.email, account.password) // same account, guaranteed
|
|
},
|
|
onboardingPage: async ({page}, use) => {
|
|
const onboardingPage = new OnboardingPage(page)
|
|
await use(onboardingPage)
|
|
},
|
|
homePage: async ({page}, use) => {
|
|
const homePage = new HomePage(page)
|
|
await use(homePage)
|
|
},
|
|
signUpPage: async ({page}, use) => {
|
|
const signUpPage = new SignUpPage(page)
|
|
await use(signUpPage)
|
|
},
|
|
authPage: async ({page}, use) => {
|
|
const authPage = new AuthPage(page)
|
|
await use(authPage)
|
|
},
|
|
profilePage: async ({page}, use) => {
|
|
const profilePage = new ProfilePage(page)
|
|
await use(profilePage)
|
|
},
|
|
compatabilityPage: async ({page}, use) => {
|
|
const compatibilityPage = new ComatibilityPage(page)
|
|
await use(compatibilityPage)
|
|
},
|
|
})
|
|
|
|
export {expect} from '@playwright/test'
|