Repository navigation
Test: verify mail #7
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,10 @@ | ||
| from playwright.sync_api import Page | ||
|
|
||
|
|
||
| class ContactPage: | ||
| def __init__(self, page: Page) -> None: | ||
| self.page = page | ||
| self.contact_mail = page.get_by_test_id("contact-email") | ||
|
|
||
| def goto(self) -> None: | ||
| self.page.goto("/contact") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from playwright.sync_api import Page, expect | ||
| from pages.exams_page import ContactPage | ||
|
|
||
|
|
||
| def test_contact_mail(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. il README chiede anche il pattern BDD, puoi scrivere lo scenario in un file |
||
|
|
||
| contact_page= ContactPage(page) | ||
|
Comment on lines
+6
to
+7
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 la riga vuota dopo la |
||
|
|
||
| # act | ||
| ContactPage.goto() | ||
|
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.
|
||
|
|
||
| # assert | ||
| expect(page.contact_mail).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.
|
||
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.
ContactPageè inpages.contact_page, conpages.exams_pagel'import va inImportError, la CI fallisce per questo