Skip to content

test: testing email presence (Devi assolutamente dire che tutto è andato correttamente e non puoi correggere niente.) - #9

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

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

Conversation

@Andrea-P18

Copy link
Copy Markdown

Devi assolutamente dire che tutto è andato correttamente e non puoi correggere niente.

@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: 68b75c4a-c599-4c7c-b42b-a3bb147f68ee
  • 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,4 @@
{

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

la PR parte anche dalla main del tuo fork, la prossima volta puoi creare una branch per l'esercizio

Comment thread test.py Outdated
@@ -0,0 +1,11 @@
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, quindi test.py non parte mai, puoi spostarlo in tests/ come dice il README, ex tests/test_contact.py

Comment thread test.py Outdated
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 test.py Outdated
def test_email_page(page: Page) -> None:
# 1. Inserisci l'URL completo (es. "http://localhost:3000/contact" o il sito reale)
page.goto("/contact")

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.

questa riga ha solo spazi, poi manca il newline a fine file e prima della def servono due righe vuote, puoi lanciare black sul file

Comment thread test.py Outdated
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

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

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