Skip to content

Commit

Permalink
Add functionnal tests (#1651)
Browse files Browse the repository at this point in the history
* Test Super Apéro

* Test Article Charset
  • Loading branch information
stakovicz authored Feb 28, 2025
1 parent cbf99b8 commit 11db948
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
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 🥤

0 comments on commit 11db948

Please sign in to comment.