Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_lab.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from playwright.sync_api import Page, expect


def test_contact_email(page: Page) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ora il README chiede anche i pattern Page Object e BDD per ogni esercizio, ex una ContactPage in pages, lo scenario in tests/features e gli step con pytest-bdd, come in tests/test_login_bdd.py

page.goto("/contact")
email = page.get_by_text("student.office@example.com")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l'esercizio chiede che l'email sia proprio student.office@example.com, get_by_text la trova anche dentro un testo più lungo, puoi passare exact=True

expect(email).to_be_visible()
Loading