Skip to content
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

Add functionnal tests #1651

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ MEETUP_API_CONSUMER_SECRET=
TECHNO_WATCH_CALENDAR_URL=https://docs.google.com/spreadsheets/d/2cUeAk86Ov7BLYyn0Ad9ge3ecbsdboeQH64wIU9a9Zzp/export?format=csv
TECHNO_WATCH_CALENDAR_KEY=9Yt0feebMyMrUWx

SUPER_APERO_CSV_URL=
SUPER_APERO_CSV_URL=../tests/behat/files/super_apero.csv

GOOGLE_ANALYTICS_ENABLED=false
GOOGLE_ANALYTICS_ID=G-CHPWDR3C1M
Expand Down
13 changes: 13 additions & 0 deletions tests/behat/features/Admin/Site/AdminSiteArticles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,16 @@ Feature: Administration - Partie Site
And I fill in "raccourci" with "un mauvais raccourci"
And I press "Ajouter"
Then I should see "Ne doit pas contenir d'espace"

Scenario: Ajout d'un article avec des émojis
Given I am logged in as admin and on the Administration
And I follow "Articles"
When I follow "Ajouter"
And I fill in "titre" with "Le titre qui envoi 🚀"
And I fill in "contenu" with "Pour un contenu rigolo 🤣"
And I fill in "raccourci" with "url-article-emojis"
And I select "Actualités" from "id_site_rubrique"
And I select "9" from "position"
And I press "Ajouter"
When I should see "Liste des articles"
Then the ".content table" element should contain "Le titre qui envoi 🚀"
9 changes: 9 additions & 0 deletions tests/behat/features/PublicSite/SuperApero.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Feature: Site Public - Super Apéro PHP

@reloadDbWithTestData
Scenario: On accède à la page Super Apéro PHP
Given I am on "/super-apero"
Then the current URL should match "#/association/super-apero$#"
And the "#main h1" element should contain "Super-apéro PHP"
And the response should contain "Super Apéro PHP – Édition Spéciale"
And the response should contain "Super Apéro PHP chez WanadevDigital"
2 changes: 2 additions & 0 deletions tests/behat/files/super_apero.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
poitiers,306320685,"🍻Super Apéro PHP – Édition Spéciale : ""Comment j’ai survécu dans l’écosystème tech"" ! 🎉"
lyon,306104038,🍻 Super Apéro PHP chez WanadevDigital 🥤