diff --git a/db/seeds/Compta.php b/db/seeds/Compta.php new file mode 100644 index 000000000..c3a33104c --- /dev/null +++ b/db/seeds/Compta.php @@ -0,0 +1,39 @@ + 2, + 'idcategorie' => 34, + 'montant' => 1000, + 'idmode_regl' => 2, + 'date_regl' => '2023-10-16', + 'description' => 'Une recette qui rapporte', + 'idevenement' => 5, + 'idcompte' => 1 + ], + [ + 'idoperation' => 1, + 'idcategorie' => 34, + 'montant' => 500, + 'idmode_regl' => 2, + 'date_regl' => '2023-10-17', + 'description' => 'Une dépense très utile', + 'idevenement' => 5, + 'idcompte' => 1 + ], + ]; + + $table = $this->table('compta'); + $table->truncate(); + + $table + ->insert($data) + ->save(); + } +} diff --git a/tests/behat/features/Admin/Tresorerie/CompteBanques.feature b/tests/behat/features/Admin/Tresorerie/CompteBanques.feature new file mode 100644 index 000000000..aef37437b --- /dev/null +++ b/tests/behat/features/Admin/Tresorerie/CompteBanques.feature @@ -0,0 +1,28 @@ +Feature: Administration - Trésorerie - Compte banques + + @reloadDbWithTestData + Scenario: Compte banques voir le journal de banque + Given I am logged in as admin and on the Administration + When I follow "Compte banques" + Then the ".content h2" element should contain "Journal de banque" + Then I should see "16/10/2023" + Then I should see "1 000,00" + Then I should see "Une recette qui rapporte" + Then I should see "17/10/2023" + Then I should see "500,00" + Then I should see "Une dépense très utile" + Then I should see "500,00 Total débit" + Then I should see "1 000,00 Total crédit" + Then I should see "500,00 solde" + + Scenario: Compte banques Export Excel + Given I am logged in as admin and on the Administration + When I follow "Compte banques" + And I follow "Export XLSX" + Then the response header "Content-disposition" should match '#filename="compta_afup_(.*).xlsx"#' + +# Scenario: Compte banques Télécharger les justificatifs triés par mois +# Given I am logged in as admin and on the Administration +# When I follow "Compte banques" +# And I follow "Télécharger les justificatifs triés par mois" +# Then the response header "Content-disposition" should match '#???#' diff --git a/tests/behat/features/PublicSite/Rss.feature b/tests/behat/features/PublicSite/Rss.feature new file mode 100644 index 000000000..9bc0e8407 --- /dev/null +++ b/tests/behat/features/PublicSite/Rss.feature @@ -0,0 +1,9 @@ +Feature: Site Public - Flux RSS + + Scenario: On accède au flux RSS via le lien dans le footer + Given I am on the homepage + And I follow "Accédez au flux RSS de l'AFUP" + Then the response header "Content-type" should match '#^text/xml; charset=UTF-8$#' + And the response should contain "Le flux RSS de l'AFUP" + And the response should contain "" + And the response should contain ""