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
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{

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.

questo è un file di configurazione del tuo editor, puoi toglierlo dalla PR

la PR parte anche dalla main del tuo fork, la prossima volta puoi creare una branch per l'esercizio

"python-envs.defaultEnvManager": "ms-python.python:venv",
"python-envs.defaultPackageManager": "ms-python.python:pip",
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
22 changes: 22 additions & 0 deletions tests/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from playwright.sync_api import Page, expect

def test_email_page(page: Page) -> None:
# 1. Inserisci l'URL completo (es. "http://localhost:3000/contact" o il sito reale)
page.goto("/contact")

# 2. Sintassi Python (niente 'const' o ';')
email_value = page.locator('dt:text-is("Email") + dd')

# 3. Verifica (niente 'await' perché stiamo usando la sync_api, e to_contain_text in snake_case)
expect(email_value).to_contain_text("student.office@example.com")

def test_example(page:Page) -> None:
page.goto("/login")
page.get_by_role("textbox",name="Username").click()
page.get_by_role("textbox",name = "Username").fill("mario")
page.get_by_role("textbox",name="Password").click()
page.get_by_role("textbox",name="Password").fill("password123")
page.get_by_role("button", name="Log in").click()
page.goto("/profile")
matr_value = page.locator('dt:text-is("Student ID") + dd')
expect(matr_value).to_contain_text("1000012345")
Loading