Skip to content

Commit

Permalink
update playwright test for new email UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Oct 4, 2024
1 parent 7c6a464 commit 5a152d2
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions test/integration/email-cm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,7 @@ test('EMAIL contact method', async ({ page, browser }) => {
viewport: { width: 800, height: 600 },
})
await mail.goto('./')
await mail.fill('#search', email)
await mail.press('#search', 'Enter')

const message = mail.locator('.messages .msglist-message', {
hasText: 'Verification Message',
})
await expect
.poll(
async () => {
await mail.click('button[title=Refresh]')
return await message.isVisible()
},
{ message: 'wait for verification code email', timeout: 10000 },
)
.toBe(true)

await message.click()
await mail.locator(`a:has-text("To: ${email}")`).click()

const code = await mail
.frameLocator('#preview-html')
Expand All @@ -58,6 +42,7 @@ test('EMAIL contact method', async ({ page, browser }) => {
if (!code) {
throw new Error('No code found')
}
await mail.getByTitle('Delete message').click()
await mail.close()

await page.fill('input[name=code]', code)
Expand Down

0 comments on commit 5a152d2

Please sign in to comment.