mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:13:07 +00:00
test(e2e): assert visible campaign page chrome on desktop viewport
This commit is contained in:
parent
39f69e603b
commit
3d13972e48
2 changed files with 5 additions and 2 deletions
|
|
@ -299,7 +299,7 @@ test.describe('Municípios — jornadas por papel', () => {
|
|||
// `password` variable above does NOT unlock the leader account.
|
||||
await campaign.login(page, leaderPhone, leaderAccount.password)
|
||||
await page.goto(`${campaign.baseURL}/campanha/contatos`)
|
||||
await expect(page.getByText('Cadastre apoiadores pelo celular.')).toBeVisible()
|
||||
await expect(campaignPageChrome(page, 'Contatos')).toBeVisible()
|
||||
|
||||
// The leader redirect aborts `goto`'s load event (ERR_ABORTED); the
|
||||
// redirect itself is the assertion, and `toHaveURL` retries onto it.
|
||||
|
|
|
|||
|
|
@ -562,6 +562,9 @@ export const test = base.extend<CampaignE2ETestFixtures>({
|
|||
})
|
||||
|
||||
export const campaignPageChrome = (page: Page, title: string) =>
|
||||
page.locator('[data-slot="campaign-page-chrome"]').getByText(title, { exact: true })
|
||||
page
|
||||
.locator('[data-slot="campaign-page-chrome"]')
|
||||
.filter({ visible: true })
|
||||
.getByText(title, { exact: true })
|
||||
|
||||
export { expect }
|
||||
|
|
|
|||
Loading…
Reference in a new issue