-
Notifications
You must be signed in to change notification settings - Fork 0
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 afup#1457 from afup/tests_import_csv
ajout de tests fonctionnels sur l'import de fichier
- Loading branch information
Showing
5 changed files
with
91 additions
and
1 deletion.
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
43 changes: 43 additions & 0 deletions
43
tests/behat/features/Admin/Tresorerie/JournalImport.feature
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 @@ | ||
Feature: Administration - Trésorerie - Journal import | ||
|
||
@reloadDbWithTestData | ||
Scenario: Test d'import du fichier | ||
Given I am logged in as admin and on the Administration | ||
When I follow "Journal" | ||
Then the ".content h2" element should contain "Journal" | ||
# On vérifie qu'on a aucune entrée pour la période | ||
When I select "2019-01-01 - 2019-12-31" from "id_periode" | ||
And I submit the form with name "forum" | ||
Then the current URL should match "/id_periode=13/" | ||
When I check "also_display_classifed_entries" | ||
And I press "Filtrer" | ||
Then the current URL should match "/id_periode=13/" | ||
And the current URL should match "/also_display_classifed_entries=on/" | ||
And I should see " Aucune ecriture" | ||
# On importe le fichier sur le crédit mutuel | ||
When I follow "Importer un fichier CSV" | ||
Then I should see "Import CSV" | ||
When I select "CMUT" from "banque" | ||
And I attach the file "test_credit_mutuel.csv" to "fichiercsv" | ||
And I press "Soumettre" | ||
Then I should see "Le fichier a été importé" | ||
# On vérifie que l'import s'est bien passé | ||
When I select "2019-01-01 - 2019-12-31" from "id_periode" | ||
And I submit the form with name "forum" | ||
Then the current URL should match "/id_periode=13/" | ||
When I check "also_display_classifed_entries" | ||
And I press "Filtrer" | ||
Then the current URL should match "/id_periode=13/" | ||
And the current URL should match "/also_display_classifed_entries=on/" | ||
And I should not see " Aucune ecriture" | ||
# Test meetup | ||
When I follow the button of tooltip "Modifier la ligne CB MEETUP ORG SUB FACT 190323 DONT FRAIS DE COMM. 1,89 EUR" | ||
Then I should see "Modifier une écriture" | ||
Then The "idevenement" field should has the following selected text "Association AFUP" | ||
Then The "idcategorie" field should has the following selected text "Meetup" | ||
# Test Twilio | ||
When I move backward one page | ||
When I follow the button of tooltip "Modifier la ligne CB Twilio SZ5KZ54M FACT 090223 DONT FRAIS DE COMM. 0,26 EUR" | ||
Then I should see "Modifier une écriture" | ||
Then The "idevenement" field should has the following selected text "Association AFUP" | ||
Then The "idcategorie" field should has the following selected text "Outils" |
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,3 @@ | ||
Date;Date de valeur;Débit;Crédit;Libellé;Solde | ||
31/01/2019;02/02/2019;-69,73;;CB MEETUP ORG SUB FACT 190323 DONT FRAIS DE COMM. 1,89 EUR ;23147,48 | ||
31/01/2019;02/02/2019;-9,88;;CB Twilio SZ5KZ54M FACT 090223 DONT FRAIS DE COMM. 0,26 EUR ;23136,32 |