-
Notifications
You must be signed in to change notification settings - Fork 18
Add tests on Formations #250
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
base: master
Are you sure you want to change the base?
Conversation
Stoakes
left a comment
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.
Merci pour ta PR!
Il y a quelques modifications à faire avant qu'elle soit mergée, mais c'est normal pour une première.
features/formations.feature
Outdated
| Then the response status code should be 200 | ||
| Then I should see "Modifier une formation" | ||
| And I should see "Télécharger les documents" | ||
| and I should see "Supprimer la formation" |
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.
and n'est pas reconnu comme mot clé Behat. Pour que le test fonctionne, il faut utiliser And.
La même chose pour plusieurs pas dans le document.
features/formations.feature
Outdated
| Then the response status code should be 200 | ||
| Then I should see "Liste des formations" | ||
|
|
||
| Scenario: I can see Formations Homepage |
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.
Erreur de copié-collé: I can see Formations admin page
features/formations.feature
Outdated
|
|
||
| Scenario: I can see a Formation | ||
| Given I am logged in as "admin" | ||
| Given I am on "/formations/3" |
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.
Les données de démonstrations ne contiennent aucune formation, donc pour faire des tests sur une formation, il faut que tu commences par en créer au moins une.
Le pas sera ensuite Given I am on "/formations/1", car ce sera la première formation créée.
features/formations.feature
Outdated
| Then the response status code should be 200 | ||
| Then I should see "Présence aux formations 2018" | ||
|
|
||
| @dropSchema |
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.
Peux tu stp remonter l'annotation @dropschema sur le scénario précédent et supprimer le scénario Void ?
features/formations.feature
Outdated
| When I fill in "Titre" with "Formation Git" | ||
| When I fill in "Mandat" with "2018" | ||
| When I fill in "Description" with "Introduction à GitLab" | ||
| When I fill in "Categories" with "Suivi d'études" |
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.
When I fill in "Categories" with "Suivi d'études"
Input "Mgate_suivibundle_formulairetype[categorie]" cannot take "Suivi d'études" as a value (possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8). (InvalidArgumentException)
Comme expliqué par le message d'erreur, il faut passer la valeur du champ, qui se trouve en inspectant le champ. Ici, qu'importe le numéro choisi, ca devrait passer.
Les erreurs suivantes viennent du fait que la formation n'est pas créée donc ne peut pas être modifiée, lue ...
|
https://travis-ci.org/n7consulting/Incipio/builds/363724096#L3363 C'est un bug de Jeyser qui fait échouer ton test; je corrige ça et je push dans la foulée. PS: Je vais aussi changer la faute de texte |
|
Normalement j'ai corrigé ça dans la dernière version, Behat veut pas de bouton qui renvoie un lien alors j'ai utilisé la route |
|
Oui, mais c'est un bug, il ne devrait pas y avoir possibilité de supprimer une formation simplement en visitant un lien. Il faut valider un formulaire et avoir un token pour réduire les attaques CSRF. Je vais aussi proposer une expérience cohérente avec les autres pages et passer ça sur la page de modification. Par contre ça veut dire que tu devras rebase ta branche sur master. Est-ce que tu penses savoir faire ça ? |
|
Du coup je dois modifier le test pour qu'il soit pareil au test avec le bouton ? Je veux bien une explication pour rebase ma branche. |
Oui. Pour commencer, rebaser sa branche, c'est ça, notamment le petit graph sur le second écran. Je ne pense pas que ce soit possible de le faire depuis l'UI de Github. Donc il faut que tu clones le dépôt en local, te place sur ta branche, rebase master dessus puis push le tout. git clone https://github.com/ZeddRahl/Incipio.git
cd Incipio && git checkout Zedd
git rebase master
git push
# si le git push ne marche pas: git push --force |
Add features