Repository navigation
test: aggiunti i 2 test #4
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,12 @@ | ||
| import re | ||
|
|
||
| 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") | ||
|
|
||
|
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. c'è una riga vuota in più a fine file, qui e in |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import re | ||
|
|
||
| from playwright.sync_api import Page, expect | ||
|
|
||
|
|
||
| def test_student_id(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 PR parte dalla |
||
| # 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") | ||
|
|
||
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.
renon lo usi, puoi toglierlo, vale anche pertests/test_student_id.py