-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcontracts_ingest.feature
189 lines (153 loc) · 11.5 KB
/
contracts_ingest.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# language: fr
@Contracts
@IngestContracts
Fonctionnalité: Tests d'imports et de recherches de contrats (entrée et accès)
Contexte: Avant de lancer cette suite de test, je verifie qu'au moins un contrat est uploadé.
Etant donné les tests effectués sur le tenant 0
Scénario: Import de contrat de type contract Entree
Etant donné un contract nommé data/contracts/referential_contracts_for_tnr_ok.json
Quand j'importe ce contrat de type INGEST_CONTRACTS
Et je recherche le journal des opérations
Alors le statut final du journal des opérations est OK
######################
Scénario: Import d'un contrat d'entrée avec le champ « Formats non identifiés autorisés » champ absent
Etant donné un contract nommé data/contracts/entree/OK_contract_FormatUnidentifiedAuthorized_absent.json
Quand j'importe ce contrat de type INGEST_CONTRACTS
Et je recherche le journal des opérations
Alors le statut final du journal des opérations est OK
Scénario: import OK de contrats d'entrée avec le champ FormatUnidentifiedAuthorized correct
Etant donné un contract nommé data/contracts/entree/contract_FormatUnidentifiedAuthorized_ok.json
Quand j'importe ce contrat de type INGEST_CONTRACTS
Quand j'utilise le fichier de requête suivant data/queries/select_ingest_contract_by_parameter.json
Et j'utilise dans la requête le paramètre PARAMETER avec la valeur Identifier
Et j'utilise dans la requête le paramètre VALUE avec la valeur Accepte_les_objets_non_identifies
Et je recherche les données dans le référentiel INGEST_CONTRACTS
Alors le nombre de résultat est 1
Quand j'utilise le fichier de requête suivant data/queries/select_ingest_contract_by_parameter.json
Et j'utilise dans la requête le paramètre PARAMETER avec la valeur Identifier
Et j'utilise dans la requête le paramètre VALUE avec la valeur Rejette_les_objets_non_identifies
Et je recherche les données dans le référentiel INGEST_CONTRACTS
Alors le nombre de résultat est 1
Et je recherche le journal des opérations
Alors le statut final du journal des opérations est OK
Scénario: import OK de contrats d'entrée avec le champ EveryFormatType et FormatType corrects
Etant donné un contract nommé data/contracts/entree/contract_EveryFormatType_ok.json
Alors j'importe ce contrat de type INGEST_CONTRACTS
Quand j'utilise le fichier de requête suivant data/queries/select_ingest_contract_by_parameter.json
Et j'utilise dans la requête le paramètre PARAMETER avec la valeur Identifier
Et j'utilise dans la requête le paramètre VALUE avec la valeur Accepte_tous_les_formats
Et je recherche les données dans le référentiel INGEST_CONTRACTS
Alors le nombre de résultat est 1
Quand j'utilise le fichier de requête suivant data/queries/select_ingest_contract_by_parameter.json
Et j'utilise dans la requête le paramètre PARAMETER avec la valeur Identifier
Et j'utilise dans la requête le paramètre VALUE avec la valeur Accepte_formats_liste_blanche
Et je recherche les données dans le référentiel INGEST_CONTRACTS
Alors le nombre de résultat est 1
Et je recherche le journal des opérations
Alors le statut final du journal des opérations est OK
Scénario: Import de contrat avec un minimum d'informations
Etant donné un contract nommé data/contracts/entree/contract_minimal.json
Alors j'importe ce contrat de type INGEST_CONTRACTS
Quand je cherche un contrat de type INGEST_CONTRACTS et nommé Contract_with_the_less_fields_as_possible
Alors le contrat existe
Et les métadonnées du contrat sont
| Status | INACTIVE |
| CheckParentLink | AUTHORIZED |
| MasterMandatory | true |
| EveryDataObjectVersion | false |
# Cas KO
Scénario: Tentative d'import KO d'un contrat d'entrée déjà existant
Etant donné un contract nommé data/contracts/referential_contracts_ok.json
Alors j'importe ce contrat incorrect de type INGEST_CONTRACTS
Et je recherche le journal des opérations
Alors le statut final du journal des opérations est KO
Scénario: Import de deux contrats d'ingest de même noms
Etant donné un contract nommé data/contracts/two_same_name_ingest_contracts.json
Alors j'importe ce contrat de type INGEST_CONTRACTS
Scénario: Import d'un contrat d'entrée avec le champ "Tous les formats" en FALSE et une liste de format non conforme
Etant donné un contract nommé data/contracts/entree/KO_contract_FormatType_unknown.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Import d'un contrat d'entrée avec le champ "Tous les formats" en FALSE et une liste de format vide
Etant donné un contract nommé data/contracts/entree/KO_contract_FormatType_empty.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: import d'un contrat d’entrée au mauvais format
Etant donné un contract nommé data/contracts/entree/referential_contracts_KO.pdf
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: import d'un contrat d’entrée qui n'est pas au format json
Etant donné un contract nommé data/contracts/entree/KO_Contrat_entree_JSON_ne_correspond_pas_au_modele_attendu.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Import d’un contrat d’entrée Champ obligatoire non renseigné
Etant donné un contract nommé data/contracts/entree/KO_referential_contracts_Champ_obligatoire_non_renseigne.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Et le statut final du journal des opérations est KO
Scénario: Import d'un contrat d'entrée déclarant un Status dont la valeur n’est ni ACTIVE ni INACTIVE
Etant donné un contract nommé data/contracts/entree/KO_erreur_valeur_champ-Status.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Import d'un contrat d'entrée déclarant une date au mauvais format
Etant donné un contract nommé data/contracts/entree/KO_Contrat_entree_date_mauvais_format.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Et je recherche le journal des opérations
Alors le statut final du journal des opérations est KO
Scénario: Import d'un contrat d'entrée déclarant un LinkParentId inconnu du système
Etant donné un contract nommé data/contracts/entree/KO_IC_INVALID_CheckParentLink.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Import d'un contrat d'entrée déclarant un un ArchiveProfile inconnu du système
Etant donné un contract nommé data/contracts/entree/KO_contractIngest_ArchiveProfile_inconnu.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Import d’un contrat d’entrée déclarant un FormatType inconnu du système
Etant donné un contract nommé data/contracts/entree/KO_contractIngest_FormatType_inconnu.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Et le statut final du journal des opérations est KO
#Et le champ 'outMessg' de l'évenement final est : Echec de l'import : Un ou plusieurs formats ne sont pas référencés dans le Référentiel des formats
#Et le champ 'evDetData' de l'évenement final est : Mandatory Fields" : "ingestContractCheck" : "One or multiple file format Rejette_tous_formats_mais_mauvaise_liste_blanche not found in db
Scénario: Import d’un contrat d’entrée dont le EveryFormatType a pour valeur TRUE et dont FormatType ne possède pas de valeur
Etant donné un contract nommé data/contracts/entree/KO_contractIngest_FormatType_inconnu.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Et le statut final du journal des opérations est KO
Scénario: Tentative d'import de contrat d'accès ko (nom manquant)
Etant donné les tests effectués sur le contrat id ContratTNR
Et un contract nommé data/contracts/ko_contrat_acces_name_manquant.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import de contrat d'accès ko (fichier xml)
Etant donné un contract nommé data/contracts/ko_contrat_acces.xml
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Scénario: Tentative d'import de contrat d'entrée ko (nom manquant)
Etant donné un contract nommé data/contracts/ko_referential_contracts_INVALID_MissingName.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Scénario: Tentative d'import de contrat d'entrée ko (fichier xml)
Etant donné un contract nommé data/contracts/ko_referential_contracts.xml
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Scénario: Tentative d'import de contrat d'entrée ko (Id du plan parent est incorrect)
Etant donné un contract nommé data/contracts/referential_contracts_unknowID_ko.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Scénario: Tentative d'import de contrat d'entrée ko (JSON contenant des contenus HTML toxiques)
Etant donné un contract nommé data/contracts/JSON_HTML.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import KO d'un contrat d'entrée avec le champ FormatUnidentifiedAuthorized dont la valeur est invalide
Etant donné un contract nommé data/contracts/entree/contract_FormatUnidentifiedAuthorized_ko_1.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import KO d'un contrat d'entrée avec le champ EveryFormatType=true mais FormatType possède une valeur
Etant donné un contract nommé data/contracts/entree/contract_EveryFormatType_ko_1.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import KO d'un contrat d'entrée avec le champ EveryFormatType=true et FormatType dont la valeur est invalide
Etant donné un contract nommé data/contracts/entree/contract_EveryFormatType_ko_2.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import KO d'un contrat d'entrée avec le champ EveryFormatType=false et FormatType dont la valeur est invalide
Etant donné un contract nommé data/contracts/entree/contract_EveryFormatType_ko_3.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import KO d'un contrat d'entrée avec le champ EveryFormatType=false et FormatType dont la valeur est vide (tableau vide)
Etant donné un contract nommé data/contracts/entree/contract_EveryFormatType_ko_4.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
Scénario: Tentative d'import KO d'un contrat d'entrée avec le champ EveryFormatType=false et FormatType est absent du fichier JSON importé
Etant donné un contract nommé data/contracts/entree/contract_EveryFormatType_ko_5.json
Quand j'importe ce contrat incorrect de type INGEST_CONTRACTS
## recherche
@Light
Scénario: CONTRACTS - recherche de contrats d'entrée ordonnés par Name (desc)
Etant donné un contract nommé data/contracts/referential_contracts_ok_sort.json
Alors j'importe ce contrat de type INGEST_CONTRACTS
Quand j'utilise le fichier de requête suivant data/queries/select_ingest_contract_order_name_desc.json
Et je recherche les données dans le référentiel INGEST_CONTRACTS
Et les metadonnées sont
| Name | ZimbabweArchivalAgreement |
| Identifier | ZimbabweArchivalAgreement0 |