mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-30 04:23:03 -04:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
import {test as base} from '@playwright/test'
|
|
import {deleteUser} from '../utils/deleteUser'
|
|
import {onboarding, OnboardingUser} from '../utils/accountInformation'
|
|
import {OnboardingPage} from '../pages/onboardingPage'
|
|
import {HomePage} from '../pages/homePage'
|
|
import {ProfilePage} from '../pages/profilePage'
|
|
import {SignUpPage} from '../pages/signUpPage'
|
|
import {AuthPage} from '../pages/AuthPage'
|
|
|
|
export const test = base.extend<{
|
|
homePage: HomePage
|
|
onboardingPage: OnboardingPage
|
|
signUpPage: SignUpPage
|
|
profilePage: ProfilePage
|
|
authPage: AuthPage
|
|
cleanUpUsers: void
|
|
testAccount: OnboardingUser
|
|
fakerAccount: OnboardingUser
|
|
}>({
|
|
testAccount: async ({}, use) => {
|
|
await use(onboarding.account_one)
|
|
},
|
|
fakerAccount: async ({}, use) => {
|
|
await use(onboarding.faker_account)
|
|
},
|
|
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)
|
|
},
|
|
cleanUpUsers: [
|
|
async ({}, use) => {
|
|
await use()
|
|
await deleteUser(onboarding.account_one.email, onboarding.account_one.password)
|
|
await deleteUser(onboarding.faker_account.email, onboarding.faker_account.password)
|
|
},
|
|
{auto: true},
|
|
],
|
|
})
|
|
|
|
export {expect} from '@playwright/test'
|