-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Administrator
committed
Feb 13, 2024
1 parent
6ca66fd
commit 0ebdead
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import re | ||
from playwright.sync_api import Page, expect | ||
|
||
def test_home_loads_in_english(page: Page): | ||
page.goto("http://localhost:8000/") | ||
|
||
page.get_by_role("heading", name="Welcome to Jandig").click() | ||
|
||
|
||
def test_example(page: Page) -> None: | ||
page.goto("http://localhost:8000/") | ||
page.locator(".trigger-lang-modal").click() | ||
page.get_by_label("pt-br").check() | ||
page.get_by_role("button", name="Ok").click() | ||
expect(page).to_have_url("http://localhost:8000/") | ||
|
||
expect(page.get_by_role("heading")).to_have_text("Bem vindo ao Jandig") | ||
page.locator(".trigger-lang-modal").click() | ||
page.get_by_label("en-us").check() | ||
page.get_by_role("button", name="Ok").click() | ||
expect(page).to_have_url("http://localhost:8000/") | ||
expect(page.get_by_role("heading")).to_have_text("Welcome to Jandig") |