Fix Typo
This commit is contained in:
Родитель
bf2895cbff
Коммит
a1dc6802b7
|
@ -114,28 +114,28 @@ export const defaultScreenshotOpts: Partial<DefaultScreenshotOpts> = {
|
||||||
export const checkAuthState = async (page: Page) => {
|
export const checkAuthState = async (page: Page) => {
|
||||||
try {
|
try {
|
||||||
const authStateTitleString = await page.locator('h1').textContent({ timeout: 4000 })
|
const authStateTitleString = await page.locator('h1').textContent({ timeout: 4000 })
|
||||||
const checkIfTitleConatins = (potentialTitle: string) => {
|
const checkIfTitleContains = (potentialTitle: string) => {
|
||||||
return authStateTitleString?.includes(potentialTitle)
|
return authStateTitleString?.includes(potentialTitle)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case checkIfTitleConatins('Enter your email'):
|
case checkIfTitleContains('Enter your email'):
|
||||||
await enterYourEmail(page)
|
await enterYourEmail(page)
|
||||||
break;
|
break;
|
||||||
case checkIfTitleConatins('Enter your password'):
|
case checkIfTitleContains('Enter your password'):
|
||||||
await enterYourPassword(page)
|
await enterYourPassword(page)
|
||||||
break;
|
break;
|
||||||
case checkIfTitleConatins('Set your password'):
|
case checkIfTitleContains('Set your password'):
|
||||||
await setYourPassword(page)
|
await setYourPassword(page)
|
||||||
break;
|
break;
|
||||||
case checkIfTitleConatins('Enter confirmation code'):
|
case checkIfTitleContains('Enter confirmation code'):
|
||||||
await enterConfirmationCode(page)
|
await enterConfirmationCode(page)
|
||||||
break;
|
break;
|
||||||
case checkIfTitleConatins('Sign in'):
|
case checkIfTitleContains('Sign in'):
|
||||||
await signIn(page)
|
await signIn(page)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче