mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 01:51:37 -04:00
* Added Database checks to the onboarding flow * Added compatibility page setup Added more compatibility questions * Finished up the onboarding flow suite Added compatibility question tests and verifications Updated tests to cover Keywords and Headline changes recently made Updated tests to cover all of the big5 personality traits * Fix: Added 'tsconfig-paths/register' to playwright config so it applies tsconfig/ts-node to test files and imported modules....there was a syntax error: SyntaxError: tests/e2e/web/pages/homePage.ts: Unexpected token (2:0) * . * Updated ProfilePage: In some cases removed the use of "one shot grabs" using .textContent() to prevent flaky tests Added test for entering profile information post signup flow * Linting and Prettier * Fix: Merge conflict * Fix: Modified sortedAndFilteredAnswers to use "UseMemo" so that it doesnt run every time something changes * . * . * Merged "verifyInterestedInConnectingWith" and "verifyRelationShipTypeAndInterest" into "verifySeeking" to match ui changes * Added error message outlining the minimum character requirement for display names and usernames * Updated displayName error message to show when editing the user profile post signup * Fix: Added fix for None discriptive error issue #36 Updated signUp.spec.ts to use new fixture Updated Account information variable names Deleted "deleteUserFixture.ts" as it was incorporated into the "base.ts" file * Linting and Prettier * Minor cleaning * Organizing helper func * Linting and Prettier --------- Co-authored-by: MartinBraquet <martin.braquet@gmail.com>
69 lines
2.3 KiB
TypeScript
69 lines
2.3 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 {testAccounts, UserAccountInformation} 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
|
|
onboardingAccount: UserAccountInformation
|
|
fakerAccount: UserAccountInformation
|
|
specAccount: UserAccountInformation
|
|
}>({
|
|
onboardingAccount: async ({}, use) => {
|
|
const account = testAccounts.account_all_info() // 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 = testAccounts.faker_account() // email captured here
|
|
await use(account)
|
|
console.log('Cleaning up faker account...')
|
|
await deleteUser(account.email, account.password) // same account, guaranteed
|
|
},
|
|
specAccount: async ({}, use) => {
|
|
const account = testAccounts.spec_account()
|
|
await use(account)
|
|
console.log('Cleaning up spec account...')
|
|
await deleteUser(account.email, account.password)
|
|
},
|
|
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'
|