Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions tests/test_contact.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from playwright.sync_api import Page, expect


def test_contact_email(page: Page) -> None:
# arrange
page.goto("/contact")
contact_email = page.get_by_test_id("contact-email")
expect(contact_email).to_be_visible()
expect(contact_email).to_have_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.

ora manca il newline a fine file, qui e in tests/test_student_id.py, andava tolta solo la riga vuota in più

20 changes: 20 additions & 0 deletions tests/test_student_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from playwright.sync_api import Page, expect


def test_student_id(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.

la #4 ha lo stesso codice ed è ancora aperta, puoi chiuderla

anche qui ci sono tutti e due gli esercizi, puoi spostare test_student_id.py in una branch sua con un'altra PR

# arrange
page.goto("/login")
page.get_by_label("Username").fill("mario")
page.get_by_label("Password").fill("password123")

# act
page.get_by_role("button", name="Log in").click()

# assert
expect(page.get_by_role("heading", name="Welcome, Mario")).to_be_visible()

page.goto("/profile")

student_id = page.get_by_test_id("profile-student-id")
expect(student_id).to_be_visible()
expect(student_id).to_have_text("1000012345")
Loading