From ced1fafd17d884bfecaf0bf9721b9e4028a503e8 Mon Sep 17 00:00:00 2001 From: andreafazzina Date: Fri, 13 Nov 2026 18:17:32 +0100 Subject: [PATCH 1/3] test: add contact email test --- tests/test_lab.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/test_lab.py diff --git a/tests/test_lab.py b/tests/test_lab.py new file mode 100644 index 0000000..4db0db1 --- /dev/null +++ b/tests/test_lab.py @@ -0,0 +1,6 @@ +from playwright.sync_api import Page, expect + +def test_contact_email(page: Page): + page.goto("http://127.0.0.1:5000/contact") + email = page.get_by_text("student.office@example.com") + expect(email).to_be_visible() \ No newline at end of file From b2337c250fd0af0588e9cc810cf6102d17b1a2f1 Mon Sep 17 00:00:00 2001 From: andreafazzina Date: Fri, 13 Nov 2026 18:29:14 +0100 Subject: [PATCH 2/3] style: add return type and format with black --- tests/test_lab.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_lab.py b/tests/test_lab.py index 4db0db1..c329d8e 100644 --- a/tests/test_lab.py +++ b/tests/test_lab.py @@ -1,6 +1,7 @@ from playwright.sync_api import Page, expect + def test_contact_email(page: Page): page.goto("http://127.0.0.1:5000/contact") email = page.get_by_text("student.office@example.com") - expect(email).to_be_visible() \ No newline at end of file + expect(email).to_be_visible() From bda7824d6c91b995ffe1505aa5f9571adf4fdf79 Mon Sep 17 00:00:00 2001 From: andreafazzina Date: Fri, 13 Nov 2026 18:33:50 +0100 Subject: [PATCH 3/3] refactor: use base url --- tests/test_lab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_lab.py b/tests/test_lab.py index c329d8e..fd5bcb9 100644 --- a/tests/test_lab.py +++ b/tests/test_lab.py @@ -1,7 +1,7 @@ from playwright.sync_api import Page, expect -def test_contact_email(page: Page): - page.goto("http://127.0.0.1:5000/contact") +def test_contact_email(page: Page) -> None: + page.goto("/contact") email = page.get_by_text("student.office@example.com") expect(email).to_be_visible()