-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat (afup#1110): functionals tests #1329
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
49642e8
feat (afup#1110): functional test Planete PHP
stakovicz bc9caa4
feat (afup#1110): functional test Divers
stakovicz 634d433
feat (afup#1110): functional test Divers Sponsors
stakovicz d61ab6f
feat (afup#1110): functional test
stakovicz 224dd20
feat (afup#1110): functional test
stakovicz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
use Phinx\Seed\AbstractSeed; | ||
|
||
class FeedArticle extends AbstractSeed | ||
{ | ||
public function run() | ||
{ | ||
$feed = [ | ||
'nom' => 'Un super site PHP', | ||
'url' => 'https://afup.org', | ||
'feed' => 'https://afup.org/rss.xml', | ||
'etat' => 0, | ||
]; | ||
$table = $this->table('afup_planete_flux'); | ||
$table->truncate(); | ||
|
||
$table | ||
->insert($feed) | ||
->save(); | ||
|
||
$data = [ | ||
[ | ||
'afup_planete_flux_id' => 2, | ||
'clef' => '0482a33e-7370-11ee-b962-0242ac120002', | ||
'titre' => 'Un titre', | ||
'url' => 'https://afup.org/url.html', | ||
'maj' => time(), | ||
'auteur' => 'Un super auteur', | ||
'resume' => 'Un super article', | ||
'contenu' => 'Le contenu du super article', | ||
'etat' => 1 | ||
], | ||
]; | ||
|
||
$table = $this->table('afup_planete_billet'); | ||
$table->truncate(); | ||
|
||
$table | ||
->insert($data) | ||
->save(); | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
use Phinx\Seed\AbstractSeed; | ||
|
||
class NiveauPartenariat extends AbstractSeed | ||
{ | ||
public function run() | ||
{ | ||
$data = [ | ||
['titre' => 'Platine'], | ||
['titre' => 'Or'], | ||
['titre' => 'Argent'], | ||
['titre' => 'Bronze'], | ||
]; | ||
|
||
$table = $this->table('afup_niveau_partenariat'); | ||
$table->truncate(); | ||
|
||
$table | ||
->insert($data) | ||
->save(); | ||
} | ||
} |
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,19 @@ | ||
Feature: Administration - Administrateurs du site | ||
|
||
@reloadDbWithTestData | ||
Scenario: Afficher / modifier les administrateurs du site | ||
Given I am logged in as admin and on the Administration | ||
And I follow "Administrateurs du site" | ||
Then I should see "Administrateurs du site" | ||
And I should see "Admin Admin Actif Administrateur" | ||
And I follow the button of tooltip "Modifier la fiche de Admin Admin" | ||
And I should see "Modifier une personne physique" | ||
And I fill in "user_edit_lastname" with "SuperLastnameAdmin" | ||
And I fill in "user_edit_firstname" with "SuperFirstnameAdmin" | ||
And I fill in "user_edit_address" with "Address" | ||
And I fill in "user_edit_zipcode" with "77777" | ||
And I fill in "user_edit_city" with "City" | ||
And I press "Modifier" | ||
Then the ".content .message" element should contain "La personne physique a été modifiée" | ||
And I follow "Administrateurs du site" | ||
And I should see "SuperLastnameAdmin SuperFirstnameAdmin Actif Administrateur" |
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,12 @@ | ||
Feature: Administration - Configuration | ||
|
||
@reloadDbWithTestData | ||
Scenario: Afficher / modifier l'adresse | ||
Given I am logged in as admin and on the Administration | ||
And I follow "Configuration du site" | ||
Then I should see "Configuration" | ||
And I should see "32, Boulevard de Strasbourg CS 30108" | ||
And I fill in "afup|adresse" with "32, Boulevard de Nantes CS 30108" | ||
When I press "Enregistrer" | ||
Then the ".content .message" element should contain "La configuration a été enregistrée" | ||
And I should see "32, Boulevard de Nantes CS 30108" |
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,8 @@ | ||
Feature: Administration - Logs | ||
|
||
@reloadDbWithTestData | ||
Scenario: Afficher les logs | ||
Given I am logged in as admin and on the Administration | ||
And I follow "Logs" | ||
Then I should see "Logs" | ||
And I should see "Date Nom Prénom Texte" |
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,38 @@ | ||
Feature: Administration - Sponsors/Partenaires | ||
|
||
@reloadDbWithTestData | ||
Scenario: Afficher Sponsors/Partenaires création / modification / suppression | ||
Given I am logged in as admin and on the Administration | ||
And I follow "Sponsors/Partenaires" | ||
Then I should see "Liste des sponsors/partenaires de forum" | ||
And I should see "Aucun inscrit" | ||
# Création | ||
When I follow "Ajouter un partenaire" | ||
Then I should see "Ajouter un partenaire" | ||
# Choix du Forum | ||
And I fill in "id_forum" with "1" | ||
# Choix du niveau Or | ||
And I fill in "id_niveau_partenariat" with "2" | ||
And I fill in "ranking" with "42" | ||
And I fill in "nom" with "Un partenaire en Or" | ||
And I fill in "presentation" with "La présentation du partenaire en Or" | ||
And I fill in "site" with "https://www.exemple.com" | ||
And I attach the file "avatar1.png" to "logo" | ||
When I press "Soumettre" | ||
# Liste | ||
Then the ".content .message" element should contain "Le partenaire a été ajouté" | ||
And I should see "forum Or Un partenaire en Or https://www.exemple.com avatar1.png 42" | ||
# Modification | ||
When I follow "Modifier le partenaire Un partenaire en Or" | ||
Then I should see "Partenaire de forum" | ||
And I fill in "ranking" with "73" | ||
And I fill in "nom" with "Un partenaire modifié" | ||
And I fill in "presentation" with "La présentation du partenaire modifié" | ||
And I fill in "site" with "https://www.exemple.com/updated" | ||
When I press "Soumettre" | ||
Then the ".content .message" element should contain "Le partenaire a été modifié" | ||
And I should see "forum Or Un partenaire modifié https://www.exemple.com/updated avatar1.png 73" | ||
# Suppression | ||
When I follow "Supprimer le partenaire Un partenaire modifié" | ||
Then the ".content .message" element should contain "Le partenaire a été supprimé" | ||
And I should see "Aucun inscrit" |
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,8 @@ | ||
Feature: Administration - Planète PHP - Billets | ||
|
||
@reloadDbWithTestData | ||
Scenario: Gestion des flux | ||
Given I am logged in as admin and on the Administration | ||
When I follow "Billets" | ||
Then the ".content h2" element should contain "Billets" | ||
And I should see "Un titre Le contenu du super article Actif" |
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,31 @@ | ||
Feature: Administration - Planète PHP - Flux | ||
|
||
Scenario: Gestion des flux | ||
Given I am logged in as admin and on the Administration | ||
When I follow "Flux" | ||
Then the ".content h2" element should contain "Flux" | ||
# Ajout d'un flux | ||
When I follow "Ajouter" | ||
Then the ".content h2" element should contain "Ajouter un flux" | ||
When I fill in "feed_form[name]" with "Site web les-tilleuls.coop" | ||
And I fill in "feed_form[url]" with "https://les-tilleuls.coop" | ||
And I fill in "feed_form[feed]" with "https://les-tilleuls.coop/feed.xml" | ||
And I press "Ajouter" | ||
Then the ".content .message" element should contain "Le flux a été ajouté" | ||
# Liste des flux | ||
And I should see "les-tilleuls.coop https://les-tilleuls.coop Actif Oui non testé" | ||
# Test de validité | ||
When I follow "Test validité" | ||
And I should see "les-tilleuls.coop https://les-tilleuls.coop Actif Oui validé" | ||
# Modification + désactivation d'un flux | ||
When I follow the button of tooltip "Modifier la fiche de Site web les-tilleuls.coop" | ||
Then the ".content h2" element should contain "Modifier un flux" | ||
When I fill in "feed_form[name]" with "Site web les-tilleuls.coop modifié" | ||
And I select "0" from "feed_form[status]" | ||
And I press "Modifier" | ||
Then the ".content .message" element should contain "Le flux a été modifié" | ||
And I should see "les-tilleuls.coop modifié https://les-tilleuls.coop Inactif" | ||
# Suppression | ||
When I follow the button of tooltip "Supprimer la fiche de Site web les-tilleuls.coop modifié" | ||
Then the ".content .message" element should contain "Le flux a été supprimé" | ||
And I should not see "les-tilleuls.coop" |
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ Feature: Administration - Trésorerie - Recherche comptable | |
Then the ".content h2" element should contain "Recherche comptable" | ||
When I fill in "q" with "raoul" | ||
And I press "Rechercher" | ||
And I should see "Jul 13, 2018 > Jul 8, 2019 150.00 Dupont Raoul <[email protected]>" | ||
And I should see "Jul 13, 2018 >" | ||
And I should see "150.00 Dupont Raoul <[email protected]>" |
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: Espace membre > Personne morale > Personnes rattachés | ||
|
||
@reloadDbWithTestData | ||
@clearEmails | ||
Scenario: Gestions des droits | ||
Given I am logged-in with the user "edmonddupont" and the password "edmonddupont" | ||
And I follow "Espace membre" | ||
Then I should see "Espace membre" | ||
And I follow "Modifier les personnes rattachées" | ||
# Liste des membres | ||
Then I should see "Les membres rattachés à mon entreprise" | ||
Then I should see "Jan Raoul Non [email protected]" | ||
# Donner les droits | ||
And I press "Donner les droits de gestion" | ||
Then I should see "Le membre a été promu en tant que manager." | ||
# Retirer les droits | ||
And I press "Enlever les droits de gestion" | ||
Then I should see "Le membre n'a plus accès la gestion de l'entreprise." | ||
|
||
@reloadDbWithTestData | ||
@clearEmails | ||
Scenario: Invitation des membres | ||
Given I am logged-in with the user "edmonddupont" and the password "edmonddupont" | ||
And I follow "Espace membre" | ||
Then I should see "Espace membre" | ||
And I follow "Modifier les personnes rattachées" | ||
# Envoyer une invitation | ||
Then I fill in "company_member_invitation[email]" with "[email protected]" | ||
And I press "Envoyer l'invitation" | ||
Then I should see "L'invitation a été envoyée à l'adresse [email protected]." | ||
And I should only receive the following emails: | ||
| to | subject | | ||
| <email1@email.com> | MyCorp vous invite à profiter de son compte "Membre AFUP" | | ||
And I should see "[email protected] Non" | ||
# Envoyer la dernière | ||
Then I fill in "company_member_invitation[email]" with "[email protected]" | ||
And I press "Envoyer l'invitation" | ||
# Renvoyer la dernière invitation | ||
And I press "Envoyer à nouveau" | ||
And I should see "L'invitation a été renvoyée." | ||
And I should only receive the following emails: | ||
| to | subject | | ||
| <email1@email.com> | MyCorp vous invite à profiter de son compte "Membre AFUP" | | ||
| <email2@email.com> | MyCorp vous invite à profiter de son compte "Membre AFUP" | | ||
| <email1@email.com> | MyCorp vous invite à profiter de son compte "Membre AFUP" | | ||
# Invitation max bloqué | ||
Then I should see "Vous avez actuellement 1 membre(s) rattaché(s) et 2 invitation(s) en attente." | ||
# Annulation d'une invitation | ||
And I press "Annuler" | ||
Then I should see "L'invitation a été annulée." | ||
Then I should not see "Vous avez actuellement 1 membre(s) rattaché(s) et 2 invitation(s) en attente." |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a une autre entrée dans le menu qui est Configuration.