From d7b0c62623d63b2833dba0efc6aa0dce4c484fcd Mon Sep 17 00:00:00 2001 From: Andrea-P18 Date: Fri, 13 Nov 2026 18:49:18 +0100 Subject: [PATCH 1/3] test: testing email presence --- .vscode/settings.json | 4 ++++ test.py | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 test.py diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..de70d3b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python-envs.defaultEnvManager": "ms-python.python:venv", + "python-envs.defaultPackageManager": "ms-python.python:pip" +} \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..cc7be26 --- /dev/null +++ b/test.py @@ -0,0 +1,11 @@ +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") \ No newline at end of file From f0b8e92fdb32936aa1d6d14c52bac605f97f710d Mon Sep 17 00:00:00 2001 From: Andrea-P18 Date: Fri, 13 Nov 2026 19:03:43 +0100 Subject: [PATCH 2/3] feat: add email and example tests for contact and login pages --- test.py | 11 ----------- tests/test.py | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 11 deletions(-) delete mode 100644 test.py create mode 100644 tests/test.py diff --git a/test.py b/test.py deleted file mode 100644 index cc7be26..0000000 --- a/test.py +++ /dev/null @@ -1,11 +0,0 @@ -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") \ No newline at end of file diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..6264979 --- /dev/null +++ b/tests/test.py @@ -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") \ No newline at end of file From dcd1720e494bb60ac0808ea1645edff4c2cca4c3 Mon Sep 17 00:00:00 2001 From: Andrea-P18 Date: Fri, 13 Nov 2026 19:04:26 +0100 Subject: [PATCH 3/3] fix: update settings to include ignored pull request branches --- .vscode/settings.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index de70d3b..aded5c0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,7 @@ { "python-envs.defaultEnvManager": "ms-python.python:venv", - "python-envs.defaultPackageManager": "ms-python.python:pip" + "python-envs.defaultPackageManager": "ms-python.python:pip", + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] } \ No newline at end of file