Skip to content

Added a new test to verify the ID number - #12

Open
Andrea-P18 wants to merge 3 commits into
UNICT-Quality-Development:mainfrom
Andrea-P18:nuovo
Open

Andrea-P18 wants to merge 3 commits into
UNICT-Quality-Development:mainfrom
Andrea-P18:nuovo

Conversation

@Andrea-P18

Copy link
Copy Markdown

No description provided.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5376e6a9-37ed-4fe1-a58d-24f7710991b2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread .vscode/settings.json
@@ -0,0 +1,7 @@
{

Copy link
Copy Markdown
Member

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

Comment thread tests/test.py
@@ -0,0 +1,22 @@
from playwright.sync_api import Page, expect

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest esegue solo i file che si chiamano test_*.py, infatti la CI raccoglie solo i 9 test che c'erano già, puoi chiamarlo ex tests/test_student_id.py

Comment thread tests/test.py
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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é pytest.ini ha già il base_url

Comment thread tests/test.py
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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l'esercizio chiede che l'email sia proprio student.office@example.com, con to_contain_text passa anche se c'è altro testo intorno, puoi usare to_have_text, vale anche per lo student ID alla riga 22

Comment thread tests/test.py
# 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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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

Comment thread tests/test.py
Comment on lines +14 to +16
page.goto("/login")
page.get_by_role("textbox",name="Username").click()
page.get_by_role("textbox",name = "Username").fill("mario")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mancano gli spazi dopo le virgole e dopo page:, e in name = "Username" vanno tolti, poi prima delle def servono due righe vuote, la riga 6 ha solo spazi e manca il newline a fine file, puoi lanciare black sul file

Comment thread tests/test.py
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')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

puoi chiamare matr_value in inglese, ex student_id, e il test con quello che controlla, ex test_student_id al posto di test_example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants