refactoring #13
1 changed files with 19 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
import os
|
||||
|
||||
from playwright.sync_api import Page, expect
|
||||
|
||||
from pytest_abra import BaseUrl
|
||||
|
||||
|
||||
def setup_trigger_email(wordpress_admin_page: Page, URL: BaseUrl):
|
||||
"""change profile email to EMAIL to trigger email"""
|
||||
page = wordpress_admin_page
|
||||
page.goto(URL.get("wp-admin/profile.php"))
|
||||
EMAIL = os.environ["IMAP_EMAIL"]
|
||||
print(EMAIL)
|
||||
# breakpoint()
|
||||
page.pause()
|
||||
page.locator("input[id='email']").fill(EMAIL)
|
||||
page.locator("input[id='submit']").click()
|
||||
|
||||
expect(page.locator("div.notice").get_by_text(EMAIL)).to_be_visible()
|
||||
Loading…
Add table
Add a link
Reference in a new issue