mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:13:07 +00:00
style(OPS30): prettier — formatação do login retry no fixture
This commit is contained in:
parent
48088d8162
commit
39e6e9405c
1 changed files with 2 additions and 5 deletions
|
|
@ -633,8 +633,7 @@ export const campaignFixture: CampaignE2EFixtureValue = async ({}, runFixture) =
|
|||
// crisp wait error, not a generic test timeout. A second failure
|
||||
// surfaces — wrong credentials fail both attempts.
|
||||
const dashboardURL = `${baseURL}/campanha`
|
||||
const onDashboard = (url: string) =>
|
||||
url === dashboardURL || url === `${dashboardURL}/`
|
||||
const onDashboard = (url: string) => url === dashboardURL || url === `${dashboardURL}/`
|
||||
const submitLogin = async () => {
|
||||
await page.getByLabel('E-mail ou celular').fill(identifier)
|
||||
await page.getByLabel('Senha').fill(password)
|
||||
|
|
@ -653,9 +652,7 @@ export const campaignFixture: CampaignE2EFixtureValue = async ({}, runFixture) =
|
|||
const current = page.url()
|
||||
if (onDashboard(current)) return
|
||||
if (!current.startsWith(`${baseURL}/campanha/login`)) {
|
||||
throw new Error(
|
||||
`Login retry aborted: page left the login screen (${current}).`,
|
||||
)
|
||||
throw new Error(`Login retry aborted: page left the login screen (${current}).`)
|
||||
}
|
||||
await submitLogin()
|
||||
await page.waitForURL(dashboardURL, { timeout: 30_000 })
|
||||
|
|
|
|||
Loading…
Reference in a new issue