-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1342 from stakovicz/feat-1110-functional-tests
feat (#1110): functional test
- Loading branch information
Showing
14 changed files
with
193 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Feature: API pour event | ||
|
||
@reloadDbWithTestData | ||
Scenario: Liste du programme sans filtre | ||
Given I am on "/blog/forum/program?apply-publication-date-filters=0&speakers-page-prefix=/forum/conferencier-e-s/" | ||
Then the response should contain "<script type=\"application/ld+json\">" | ||
And the response should contain "Jouons tous ensemble à un petit jeu" | ||
And the response should contain "REST ou GraphQL ? Exemples illustrés avec Symfony et API Platform" | ||
And the response should contain "Révolutionons PHP" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Liste du programme avec filtre | ||
Given I am on "/blog/forum/program?apply-publication-date-filters=1&speakers-page-prefix=/forum/conferencier-e-s/" | ||
Then the response should contain "<script type=\"application/ld+json\">" | ||
And the response should contain "Jouons tous ensemble à un petit jeu" | ||
And the response should contain "REST ou GraphQL ? Exemples illustrés avec Symfony et API Platform" | ||
And the response should not contain "Révolutionons PHP" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Planning | ||
Given I am on "/blog/forum/planning" | ||
Then the response should contain "La salle T" | ||
And the response should contain "<script type=\"application/ld+json\">" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Speakers sans filtre | ||
Given I am on "/blog/forum/speakers?apply-publication-date-filters=0" | ||
Then the response should contain "<script type=\"application/ld+json\">" | ||
And the response should contain "Adrien GALLOU" | ||
And the response should contain "Geoffrey BACHELET" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Speakers avec filtre | ||
Given I am on "/blog/forum/speakers?apply-publication-date-filters=1" | ||
Then the response should contain "<script type=\"application/ld+json\">" | ||
And the response should not contain "Adrien GALLOU" | ||
And the response should contain "Geoffrey BACHELET" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Ical Talk 1 | ||
Given I am on "/blog/talk_widget?ids=1" | ||
Then the response should contain "Jouons tous ensemble à un petit jeu" | ||
And the response should not contain "REST ou GraphQL ? Exemples illustrés avec Symfony et API Platform" | ||
And the response should contain "Geoffrey BACHELET" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Ical Talk 1 et 2 | ||
Given I am on "/blog/talk_widget?ids=1,2" | ||
Then the response should contain "Jouons tous ensemble à un petit jeu" | ||
And the response should contain "REST ou GraphQL ? Exemples illustrés avec Symfony et API Platform" | ||
And the response should contain "Geoffrey BACHELET" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Feature: Site Public - Membres | ||
|
||
@reloadDbWithTestData | ||
@clearEmails | ||
Scenario: Liste des entreprises | ||
Given I am on the homepage | ||
When I follow "Membres" | ||
Then I should see "Entreprises adhérentes" | ||
And I should see "MyCorp" | ||
When I follow "MyCorp" | ||
Then I should see "MyCorp" | ||
Then I should see "L'entreprise" | ||
Then I should see "MyCorp n'a pas renseigné d'antenne à proximité." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Feature: Site Public - News | ||
|
||
@reloadDbWithTestData | ||
Scenario: Accès à la liste des actualités | ||
Given I am on the homepage | ||
When I follow "Actualités" | ||
Then I should see "Actualités" | ||
And I should see "Les vidéos des talks du Forum PHP 2018 sont disponibles" | ||
And I follow "Lire l'article: Les vidéos des talks du Forum PHP 2018 sont disponibles" | ||
Then I should see "Les vidéos des talks du Forum PHP 2018 sont disponibles" | ||
Then I should see "Cycle de conférences : forum / Année : 2018" | ||
|
||
@reloadDbWithTestData | ||
Scenario: Filtre sur les actualités | ||
Given I am on the homepage | ||
When I follow "Actualités" | ||
Then I should see "Actualités" | ||
And I should see "Les vidéos des talks du Forum PHP 2018 sont disponibles" | ||
And I check "news_filters_year_0" | ||
And I submit the form with name "news_filters" | ||
And I should be on "/news/?news_filters[year][0]=2018" | ||
And I should see "Les vidéos des talks du Forum PHP 2018 sont disponibles" | ||
And I check "news_filters_theme_0" | ||
And I submit the form with name "news_filters" | ||
And I should be on "/news/?news_filters[theme][0]=1" | ||
And I should not see "Les vidéos des talks du Forum PHP 2018 sont disponibles" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Feature: Site Public - Register | ||
|
||
@reloadDbWithTestData | ||
@clearEmails | ||
Scenario: Accès à l'adhésion particulier | ||
Given I am on the homepage | ||
When I follow "Adhérer" | ||
|
@@ -19,4 +20,59 @@ Feature: Site Public - Register | |
And I fill in "confirmation_mot_de_passe" with "test" | ||
And I press "Ajouter" | ||
Then I should see "Espace membre" | ||
And I should see " Merci pour votre inscription. Il ne reste plus qu'à régler votre cotisation." | ||
And I should see "Merci pour votre inscription. Il ne reste plus qu'à régler votre cotisation." | ||
When I follow "Se mettre à jour" | ||
When I press "Régler par carte" | ||
# Pour suivre la redirection POST de Paybox | ||
And I submit the form with name "PAYBOX" | ||
When I fill in "NUMERO_CARTE" with "1111222233334444" | ||
And I select "12" from "MOIS_VALIDITE" | ||
And I select "25" from "AN_VALIDITE" | ||
And I fill in "CVVX" with "123" | ||
And I press "Valider" | ||
Then I should see "PAIEMENT ACCEPTÉ" | ||
When I follow "Retour" | ||
Then I should see "Le paiement de votre cotisation s'est bien passé, merci." | ||
# Simuler l'appel de callback Paybox | ||
And simulate the Paybox callback | ||
And I should only receive the following emails: | ||
| to | subject | | ||
| <registeredUser@gmail.com> | Votre compte afup.org | | ||
|
||
@reloadDbWithTestData | ||
@clearEmails | ||
Scenario: Accès à l'adhésion entreprise | ||
Given I am on the homepage | ||
When I follow "Adhérer" | ||
Then I should see "Devenir membre de l'AFUP" | ||
When I follow "Adhérer en tant qu'entreprise" | ||
Then I should see "Adhésion entreprise à l'AFUP" | ||
When I fill in "company_member_companyName" with "Une société" | ||
And I fill in "company_member_siret" with "123456789" | ||
And I fill in "company_member_address" with "45 rue des Roses" | ||
And I fill in "company_member_zipcode" with "69003" | ||
And I fill in "company_member_city" with "LYON" | ||
And I fill in "company_member_firstName" with "Mon prénom de dirigeant" | ||
And I fill in "company_member_lastName" with "Mon nom de dirigeant" | ||
And I fill in "company_member_email" with "[email protected]" | ||
And I fill in "company_member_phone" with "0123456" | ||
And I fill in "company_member[invitations][0][email]" with "[email protected]" | ||
And I press "Enregistrer mon adhésion" | ||
And I should see "Adhésion enregistrée !" | ||
And I should see "Montant de la cotisation: 150.00 Euros" | ||
When I press "Régler par carte" | ||
# Pour suivre la redirection POST de Paybox | ||
And I submit the form with name "PAYBOX" | ||
When I fill in "NUMERO_CARTE" with "1111222233334444" | ||
And I select "12" from "MOIS_VALIDITE" | ||
And I select "25" from "AN_VALIDITE" | ||
And I fill in "CVVX" with "123" | ||
And I press "Valider" | ||
Then I should see "PAIEMENT ACCEPTÉ" | ||
When I follow "Retour" | ||
Then I should see "Le paiement de votre cotisation s'est bien passé, merci." | ||
# Simuler l'appel de callback Paybox | ||
And simulate the Paybox callback | ||
And I should only receive the following emails: | ||
| to | subject | | ||
| <registeredUser@gmail.com> | Une société vous invite à profiter de son compte "Membre AFUP" | |