diff --git a/db/seeds/Users.php b/db/seeds/Users.php index de984df97..39986d607 100644 --- a/db/seeds/Users.php +++ b/db/seeds/Users.php @@ -172,6 +172,7 @@ public function run() $oneMonthInSeconds = 60*60*24*30; $dateDebutUserExpire = mktime(17, 32, 15, 7, 13,2018); + $year = date('Y'); $data = [ [ @@ -221,6 +222,14 @@ public function run() 'date_fin' => mktime(16, 10, 10, 1, 1, 2025), 'numero_facture' => 'COTIS-2024-245', ], + [ + 'date_debut' => mktime(16, 10, 10, 1, 1, $year), + 'type_personne' => AFUP_PERSONNES_PHYSIQUES, + 'id_personne' => self::ID_USER_PERSONNE_PHYSIQUE_FIXED_COTISATIONS, + 'montant' => 30, + 'date_fin' => mktime(16, 10, 10, 1, 1, $year+1), + 'numero_facture' => "COTIS-$year-245", + ], [ 'date_debut' => mktime(16, 10, 10, 1, 2, 2023), 'type_personne' => AFUP_PERSONNES_MORALES, @@ -237,6 +246,14 @@ public function run() 'date_fin' => mktime(16, 10, 10, 1, 2, 2025), 'numero_facture' => 'COTIS-2024-249', ], + [ + 'date_debut' => mktime(16, 10, 10, 1, 2, $year), + 'type_personne' => AFUP_PERSONNES_MORALES, + 'id_personne' => self::ID_PERSONNE_MORALE_HELIOS_AEROSPACE, + 'montant' => 180, + 'date_fin' => mktime(16, 10, 10, 1, 2, $year+1), + 'numero_facture' => "COTIS-$year-249", + ], ]; $table = $this->table('afup_cotisations'); diff --git a/tests/behat/features/Admin/Tresorerie/DevisFactures.feature b/tests/behat/features/Admin/Tresorerie/DevisFactures.feature index e450ea591..7fd980ab0 100644 --- a/tests/behat/features/Admin/Tresorerie/DevisFactures.feature +++ b/tests/behat/features/Admin/Tresorerie/DevisFactures.feature @@ -68,7 +68,7 @@ Feature: Administration - Trésorerie - Devis/Facture And I should see "Paris Cedex 7" And I should see "Payé" # Envoi de la facture par email - Then I follow the button of tooltip "Envoyer la facture 2024-3 par mail" + Then I follow the button of tooltip "Envoyer la facture 2025-3 par mail" And I should only receive the following emails: | from | to | subject | | | | Facture AFUP | @@ -80,7 +80,7 @@ Feature: Administration - Trésorerie - Devis/Facture # Téléchargement de la facture When I go to "/admin/" And I follow "Factures" - And I follow the button of tooltip "Télécharger la facture 2024-3" + And I follow the button of tooltip "Télécharger la facture 2025-3" Then the response header "Content-disposition" should match '#attachment; filename="Facture - ESN dev en folie - (.*).pdf"#' When I parse the pdf downloaded content Then The page "1" of the PDF should contain "N° TVA Intracommunautaire : FR7612345" @@ -158,7 +158,7 @@ Feature: Administration - Trésorerie - Devis/Facture @vat Scenario: Test du PDF de facture après 2024 Given I am logged in as admin and on the Administration - When I go to "/pages/administration/index.php?page=compta_devis" + When I go to "/pages/administration/index.php?page=compta_devis&id_periode=15" Then the ".content h2" element should contain "Liste devis" When I follow the button of tooltip "Télécharger le devis Krampouz" Then the response header "Content-disposition" should equal 'attachment; filename="Devis - Krampouz - 2024-01-03.pdf"' diff --git a/tests/behat/features/MembersArea/Index.feature b/tests/behat/features/MembersArea/Index.feature index d263d3421..d04b532ff 100644 --- a/tests/behat/features/MembersArea/Index.feature +++ b/tests/behat/features/MembersArea/Index.feature @@ -147,7 +147,7 @@ Feature: Espace membre, accueil When I follow "Consulter" Then I should see "Payer ma cotisation" When I follow "Télécharger la facture" - Then the response header "Content-disposition" should equal 'attachment; filename="MyCorp_COTIS-2024-200_13072018.pdf"' + Then the response header "Content-disposition" should equal 'attachment; filename="MyCorp_COTIS-2025-200_13072018.pdf"' @reloadDbWithTestData Scenario: Si on est pas company manager de la personne morale, on ne peux pas télécharger la facture