Refactoring
This commit is contained in:
120
unionflow-mobile-apps/test/fixtures/demande_aide.json
vendored
Normal file
120
unionflow-mobile-apps/test/fixtures/demande_aide.json
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
{
|
||||
"id": "demande-123",
|
||||
"numeroReference": "REF-2024-001",
|
||||
"titre": "Aide médicale urgente",
|
||||
"description": "Besoin d'aide pour frais médicaux d'urgence suite à un accident",
|
||||
"typeAide": "AIDE_FINANCIERE_MEDICALE",
|
||||
"statut": "EN_ATTENTE",
|
||||
"priorite": "HAUTE",
|
||||
"estUrgente": true,
|
||||
"montantDemande": 500000.0,
|
||||
"montantApprouve": null,
|
||||
"justification": "Accident de moto nécessitant une intervention chirurgicale urgente",
|
||||
"dateCreation": "2024-01-15T10:30:00Z",
|
||||
"dateModification": "2024-01-15T14:45:00Z",
|
||||
"dateLimite": "2024-01-20T23:59:59Z",
|
||||
"dateTraitement": null,
|
||||
"organisationId": "org-1",
|
||||
"demandeurId": "user-1",
|
||||
"nomDemandeur": "Marie Kouassi",
|
||||
"emailDemandeur": "marie@example.com",
|
||||
"telephoneDemandeur": "+225123456789",
|
||||
"beneficiaires": [
|
||||
{
|
||||
"prenom": "Jean",
|
||||
"nom": "Kouassi",
|
||||
"age": 25
|
||||
}
|
||||
],
|
||||
"contactUrgence": {
|
||||
"prenom": "Paul",
|
||||
"nom": "Kouassi",
|
||||
"telephone": "+225987654321",
|
||||
"email": "paul@example.com",
|
||||
"relation": "Frère"
|
||||
},
|
||||
"localisation": {
|
||||
"adresse": "123 Rue de la Paix",
|
||||
"ville": "Abidjan",
|
||||
"codePostal": "00225",
|
||||
"pays": "Côte d'Ivoire",
|
||||
"latitude": 5.3600,
|
||||
"longitude": -4.0083
|
||||
},
|
||||
"evaluations": [
|
||||
{
|
||||
"id": "eval-1",
|
||||
"demandeId": "demande-123",
|
||||
"evaluateurId": "evaluateur-1",
|
||||
"nomEvaluateur": "Dr. Koffi",
|
||||
"typeEvaluateur": "PROFESSIONNEL_SANTE",
|
||||
"dateEvaluation": "2024-01-16T09:00:00Z",
|
||||
"noteGlobale": 4.5,
|
||||
"criteres": {
|
||||
"urgence": 5.0,
|
||||
"legitimite": 4.0,
|
||||
"faisabilite": 4.5,
|
||||
"impact": 4.5
|
||||
},
|
||||
"decision": "APPROUVE",
|
||||
"commentaires": "Cas médical urgent nécessitant une intervention rapide",
|
||||
"recommandations": "Approuver rapidement pour éviter complications",
|
||||
"piecesJustificativesValidees": true,
|
||||
"signalements": [],
|
||||
"metadonnees": {}
|
||||
}
|
||||
],
|
||||
"commentairesInternes": [
|
||||
{
|
||||
"id": "comment-1",
|
||||
"auteurId": "admin-1",
|
||||
"nomAuteur": "Admin System",
|
||||
"contenu": "Demande créée automatiquement",
|
||||
"dateCreation": "2024-01-15T10:30:00Z",
|
||||
"estPrive": true
|
||||
}
|
||||
],
|
||||
"historiqueStatuts": [
|
||||
{
|
||||
"ancienStatut": null,
|
||||
"nouveauStatut": "BROUILLON",
|
||||
"dateChangement": "2024-01-15T10:30:00Z",
|
||||
"utilisateurId": "user-1",
|
||||
"commentaire": "Création de la demande"
|
||||
},
|
||||
{
|
||||
"ancienStatut": "BROUILLON",
|
||||
"nouveauStatut": "EN_ATTENTE",
|
||||
"dateChangement": "2024-01-15T14:45:00Z",
|
||||
"utilisateurId": "user-1",
|
||||
"commentaire": "Soumission de la demande"
|
||||
}
|
||||
],
|
||||
"piecesJustificatives": [
|
||||
{
|
||||
"id": "piece-1",
|
||||
"nomFichier": "certificat_medical.pdf",
|
||||
"typeDocument": {
|
||||
"code": "CERTIFICAT_MEDICAL",
|
||||
"libelle": "Certificat médical",
|
||||
"description": "Document médical attestant de l'état de santé"
|
||||
},
|
||||
"tailleFichier": 1024000,
|
||||
"urlFichier": "/api/files/piece-1",
|
||||
"dateUpload": "2024-01-15T11:00:00Z",
|
||||
"uploadePar": "user-1",
|
||||
"estValide": true,
|
||||
"commentaires": "Certificat médical confirmant la nécessité de l'intervention"
|
||||
}
|
||||
],
|
||||
"tags": ["urgent", "médical", "accident"],
|
||||
"metadonnees": {
|
||||
"source": "mobile_app",
|
||||
"version": "1.0.0",
|
||||
"geolocalisation": {
|
||||
"latitude": 5.3600,
|
||||
"longitude": -4.0083,
|
||||
"precision": 10.0
|
||||
}
|
||||
}
|
||||
}
|
||||
74
unionflow-mobile-apps/test/fixtures/demandes_aide_list.json
vendored
Normal file
74
unionflow-mobile-apps/test/fixtures/demandes_aide_list.json
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"id": "demande-123",
|
||||
"numeroReference": "REF-2024-001",
|
||||
"titre": "Aide médicale urgente",
|
||||
"description": "Besoin d'aide pour frais médicaux d'urgence suite à un accident",
|
||||
"typeAide": "AIDE_FINANCIERE_MEDICALE",
|
||||
"statut": "EN_ATTENTE",
|
||||
"priorite": "HAUTE",
|
||||
"estUrgente": true,
|
||||
"montantDemande": 500000.0,
|
||||
"dateCreation": "2024-01-15T10:30:00Z",
|
||||
"dateModification": "2024-01-15T14:45:00Z",
|
||||
"organisationId": "org-1",
|
||||
"demandeurId": "user-1",
|
||||
"nomDemandeur": "Marie Kouassi",
|
||||
"emailDemandeur": "marie@example.com",
|
||||
"telephoneDemandeur": "+225123456789",
|
||||
"beneficiaires": [],
|
||||
"evaluations": [],
|
||||
"commentairesInternes": [],
|
||||
"historiqueStatuts": [],
|
||||
"piecesJustificatives": [],
|
||||
"tags": ["urgent", "médical"],
|
||||
"metadonnees": {}
|
||||
},
|
||||
{
|
||||
"id": "demande-124",
|
||||
"numeroReference": "REF-2024-002",
|
||||
"titre": "Aide alimentaire famille",
|
||||
"description": "Besoin d'aide alimentaire pour famille nombreuse",
|
||||
"typeAide": "AIDE_ALIMENTAIRE",
|
||||
"statut": "APPROUVE",
|
||||
"priorite": "NORMALE",
|
||||
"estUrgente": false,
|
||||
"montantDemande": 150000.0,
|
||||
"dateCreation": "2024-01-14T08:00:00Z",
|
||||
"dateModification": "2024-01-16T16:30:00Z",
|
||||
"organisationId": "org-1",
|
||||
"demandeurId": "user-2",
|
||||
"nomDemandeur": "Jean Koffi",
|
||||
"emailDemandeur": "jean@example.com",
|
||||
"telephoneDemandeur": "+225987654321",
|
||||
"beneficiaires": [
|
||||
{
|
||||
"prenom": "Marie",
|
||||
"nom": "Koffi",
|
||||
"age": 30
|
||||
},
|
||||
{
|
||||
"prenom": "Paul",
|
||||
"nom": "Koffi",
|
||||
"age": 8
|
||||
}
|
||||
],
|
||||
"evaluations": [],
|
||||
"commentairesInternes": [],
|
||||
"historiqueStatuts": [],
|
||||
"piecesJustificatives": [],
|
||||
"tags": ["famille", "alimentaire"],
|
||||
"metadonnees": {}
|
||||
}
|
||||
],
|
||||
"page": {
|
||||
"number": 0,
|
||||
"size": 20,
|
||||
"totalElements": 2,
|
||||
"totalPages": 1
|
||||
},
|
||||
"first": true,
|
||||
"last": true,
|
||||
"empty": false
|
||||
}
|
||||
31
unionflow-mobile-apps/test/fixtures/demandes_aide_urgentes.json
vendored
Normal file
31
unionflow-mobile-apps/test/fixtures/demandes_aide_urgentes.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
[
|
||||
{
|
||||
"id": "demande-urgent-1",
|
||||
"numeroReference": "REF-URG-001",
|
||||
"titre": "Urgence médicale - Accident",
|
||||
"description": "Accident grave nécessitant intervention chirurgicale immédiate",
|
||||
"typeAide": "AIDE_FINANCIERE_MEDICALE",
|
||||
"statut": "EN_ATTENTE",
|
||||
"priorite": "CRITIQUE",
|
||||
"estUrgente": true,
|
||||
"montantDemande": 1000000.0,
|
||||
"dateCreation": "2024-01-16T20:00:00Z",
|
||||
"dateModification": "2024-01-16T20:00:00Z",
|
||||
"dateLimite": "2024-01-17T08:00:00Z",
|
||||
"organisationId": "org-1",
|
||||
"demandeurId": "user-urgent-1",
|
||||
"nomDemandeur": "Urgence Patient",
|
||||
"emailDemandeur": "urgent@example.com",
|
||||
"telephoneDemandeur": "+225111222333",
|
||||
"beneficiaires": [],
|
||||
"evaluations": [],
|
||||
"commentairesInternes": [],
|
||||
"historiqueStatuts": [],
|
||||
"piecesJustificatives": [],
|
||||
"tags": ["urgent", "critique", "médical"],
|
||||
"metadonnees": {
|
||||
"urgenceLevel": "CRITIQUE",
|
||||
"timeRemaining": "12h"
|
||||
}
|
||||
}
|
||||
]
|
||||
13
unionflow-mobile-apps/test/fixtures/fixture_reader.dart
vendored
Normal file
13
unionflow-mobile-apps/test/fixtures/fixture_reader.dart
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'dart:io';
|
||||
|
||||
/// Utilitaire pour lire les fichiers de fixtures de test
|
||||
///
|
||||
/// Cette classe fournit une méthode simple pour charger
|
||||
/// les données de test depuis des fichiers JSON.
|
||||
String fixture(String name) {
|
||||
final file = File('test/fixtures/$name');
|
||||
if (!file.existsSync()) {
|
||||
throw Exception('Fixture file not found: test/fixtures/$name');
|
||||
}
|
||||
return file.readAsStringSync();
|
||||
}
|
||||
90
unionflow-mobile-apps/test/fixtures/mes_demandes.json
vendored
Normal file
90
unionflow-mobile-apps/test/fixtures/mes_demandes.json
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"id": "ma-demande-1",
|
||||
"numeroReference": "REF-ME-001",
|
||||
"titre": "Ma demande d'aide logement",
|
||||
"description": "Demande d'aide pour le loyer suite à perte d'emploi",
|
||||
"typeAide": "AIDE_FINANCIERE_LOGEMENT",
|
||||
"statut": "EN_COURS",
|
||||
"priorite": "HAUTE",
|
||||
"estUrgente": true,
|
||||
"montantDemande": 300000.0,
|
||||
"dateCreation": "2024-01-10T14:00:00Z",
|
||||
"dateModification": "2024-01-15T10:00:00Z",
|
||||
"organisationId": "org-1",
|
||||
"demandeurId": "user-1",
|
||||
"nomDemandeur": "Mon Nom",
|
||||
"emailDemandeur": "mon@example.com",
|
||||
"telephoneDemandeur": "+225123456789",
|
||||
"beneficiaires": [
|
||||
{
|
||||
"prenom": "Mon Enfant",
|
||||
"nom": "Nom",
|
||||
"age": 5
|
||||
}
|
||||
],
|
||||
"evaluations": [
|
||||
{
|
||||
"id": "eval-me-1",
|
||||
"demandeId": "ma-demande-1",
|
||||
"evaluateurId": "eval-1",
|
||||
"nomEvaluateur": "Evaluateur Social",
|
||||
"typeEvaluateur": "TRAVAILLEUR_SOCIAL",
|
||||
"dateEvaluation": "2024-01-12T09:00:00Z",
|
||||
"noteGlobale": 4.2,
|
||||
"decision": "EN_COURS",
|
||||
"commentaires": "Situation justifiée, vérifications en cours"
|
||||
}
|
||||
],
|
||||
"commentairesInternes": [],
|
||||
"historiqueStatuts": [
|
||||
{
|
||||
"ancienStatut": null,
|
||||
"nouveauStatut": "BROUILLON",
|
||||
"dateChangement": "2024-01-10T14:00:00Z",
|
||||
"utilisateurId": "user-1",
|
||||
"commentaire": "Création"
|
||||
},
|
||||
{
|
||||
"ancienStatut": "BROUILLON",
|
||||
"nouveauStatut": "EN_ATTENTE",
|
||||
"dateChangement": "2024-01-10T15:00:00Z",
|
||||
"utilisateurId": "user-1",
|
||||
"commentaire": "Soumission"
|
||||
},
|
||||
{
|
||||
"ancienStatut": "EN_ATTENTE",
|
||||
"nouveauStatut": "EN_COURS",
|
||||
"dateChangement": "2024-01-12T09:00:00Z",
|
||||
"utilisateurId": "eval-1",
|
||||
"commentaire": "Prise en charge"
|
||||
}
|
||||
],
|
||||
"piecesJustificatives": [
|
||||
{
|
||||
"id": "piece-me-1",
|
||||
"nomFichier": "attestation_pole_emploi.pdf",
|
||||
"typeDocument": {
|
||||
"code": "ATTESTATION_CHOMAGE",
|
||||
"libelle": "Attestation Pôle Emploi"
|
||||
},
|
||||
"tailleFichier": 512000,
|
||||
"dateUpload": "2024-01-10T14:30:00Z",
|
||||
"estValide": true
|
||||
}
|
||||
],
|
||||
"tags": ["logement", "urgent", "chomage"],
|
||||
"metadonnees": {}
|
||||
}
|
||||
],
|
||||
"page": {
|
||||
"number": 0,
|
||||
"size": 20,
|
||||
"totalElements": 1,
|
||||
"totalPages": 1
|
||||
},
|
||||
"first": true,
|
||||
"last": true,
|
||||
"empty": false
|
||||
}
|
||||
Reference in New Issue
Block a user