Repository navigation
Added a new test to verify the ID number #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "python-envs.defaultEnvManager": "ms-python.python:venv", | ||
| "python-envs.defaultPackageManager": "ms-python.python:pip", | ||
| "githubPullRequests.ignoredPullRequestBranches": [ | ||
| "main" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from playwright.sync_api import Page, expect | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pytest esegue solo i file che si chiamano |
||
|
|
||
| def test_email_page(page: Page) -> None: | ||
| # 1. Inserisci l'URL completo (es. "http://localhost:3000/contact" o il sito reale) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. puoi togliere questi commenti, sono appunti in italiano, e qui l'URL completo non serve perché |
||
| 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") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. l'esercizio chiede che l'email sia proprio |
||
|
|
||
| def test_example(page:Page) -> None: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. la #9 punta allo stesso commit ed è ancora aperta, puoi chiuderla qui però ci sono tutti e due gli esercizi, puoi lasciare in questa PR solo il test dello student ID e aprirne un'altra per l'email |
||
| page.goto("/login") | ||
| page.get_by_role("textbox",name="Username").click() | ||
| page.get_by_role("textbox",name = "Username").fill("mario") | ||
|
Comment on lines
+14
to
+16
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mancano gli spazi dopo le virgole e dopo |
||
| 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') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. puoi chiamare |
||
| expect(matr_value).to_contain_text("1000012345") | ||
There was a problem hiding this comment.
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