mbi...@hephaestos.ovh.adullact.org
unread,Oct 26, 2020, 3:07:24 PM10/26/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openmairi...@googlegroups.com
Author: mbideau
Date: 2020-10-26 20:07:21 +0100 (Mon, 26 Oct 2020)
New Revision: 9632
Modified:
branches/4.14.0-develop_ajout_dossier_commune/tests/030_demande.robot
Log:
Tests: corrections mineures du test '030_demande' liees a la temporisation de l'affichage des champs du formulaire de demande
Modified: branches/4.14.0-develop_ajout_dossier_commune/tests/030_demande.robot
===================================================================
--- branches/4.14.0-develop_ajout_dossier_commune/tests/030_demande.robot 2020-10-26 16:31:07 UTC (rev 9631)
+++ branches/4.14.0-develop_ajout_dossier_commune/tests/030_demande.robot 2020-10-26 19:07:21 UTC (rev 9632)
@@ -987,9 +987,10 @@
Select From List By Label dossier_autorisation_type_detaille Permis de démolir
Select From List By Label dossier_autorisation_type_detaille Infraction
Wait Until Element Is Visible css=#moreFieldReferenceCadastrale0
- Click Element css=#moreFieldReferenceCadastrale0
+ Click Element Until New Element css=#moreFieldReferenceCadastrale0 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(5)
# Deux nouvaux champs devraient avoir été ajoutés
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=5
# changement de type pour reset le nombre de champs
Select From List By Label dossier_autorisation_type_detaille Permis de démolir
@@ -1000,7 +1001,7 @@
# Saisie de 812BC8834A8856 878DE8898
@{ref_cad} = Create List 812 BC 8834 A 8856
Saisir les références cadastrales ${ref_cad} # 1re ligne
- Click Element css=#morelineReferenceCadastrale
+ Click Element Until New Element css=#morelineReferenceCadastrale css=.reference_cadastrale_custom_fields > br:nth-child(7)
# 1er champ, 2e ligne (dans le groupe de champs, parmis les noeuds suivants
# frères du br, celui avec le placeholder "Quart.")
Input Text css=.reference_cadastrale_custom_fields br ~ input[placeholder="Quart."]
@@ -1015,7 +1016,8 @@
# On s'assure que les assertions sur les champs marchent quand l'état est
# propre. Avant de commencer à maltraiter le formulaire.
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
Execute Javascript getDataFieldReferenceCadastrale();
Textarea Value Should Be css=#terrain_references_cadastrales
@@ -1024,12 +1026,14 @@
# Déclenchement erreur (pas de collectivité ni pétionnaire)
Click On Submit Button Until Message SAISIE NON ENREGISTRÉE
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
# Check fonctionnement des boutons
- Click Element css=#moreFieldReferenceCadastrale0
- Click Element css=#moreFieldReferenceCadastrale1
- Page Should Contain Element
+ Click Element Until New Element css=#moreFieldReferenceCadastrale0 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(7)
+ Click Element Until New Element css=#moreFieldReferenceCadastrale1 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(14)
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=12
Execute Javascript getDataFieldReferenceCadastrale();
Textarea Value Should Be css=#terrain_references_cadastrales
@@ -1038,13 +1042,16 @@
## 3 ##
Select From List By Label dossier_autorisation_type_detaille Infraction
+ Wait Until Element Is Visible css=.reference_cadastrale_custom_fields
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
# Check fonctionnement des boutons
- Click Element css=#moreFieldReferenceCadastrale0
- Click Element css=#moreFieldReferenceCadastrale1
- Page Should Contain Element
+ Click Element Until New Element css=#moreFieldReferenceCadastrale0 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(7)
+ Click Element Until New Element css=#moreFieldReferenceCadastrale1 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(14)
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=12
# Check valeur après nombre champs pour être sûr que l'ancienne valeur n'est plus là.
# Car le nombre de champs change entre la partie d'avant et celle-ci donc
@@ -1091,8 +1098,10 @@
... accepter un dossier sans réserve
Depuis le contexte de demande sur existant via l'URL ${di_libelle}
Select From List By Label demande_type Demande de modification
+ Wait Until Element Is Visible css=.reference_cadastrale_custom_fields
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
Execute Javascript getDataFieldReferenceCadastrale();
${refad_from_fields} = Get Value terrain_references_cadastrales
@@ -1100,9 +1109,11 @@
# Changement de type pour réafficher les champs
Select From List By Label demande_type Demande d'ouverture de chantier
+ Wait Until Element Is Visible css=.reference_cadastrale_custom_fields
Wait Until All JavaScript Finished # Si tout se passe trop vite, il y aura encore l'ancienne valeur
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
Execute Javascript getDataFieldReferenceCadastrale();
${refad_from_fields} = Get Value terrain_references_cadastrales
@@ -1111,9 +1122,11 @@
# Rechangement de type car les champs peuvent se casser de plus en plus avec
# les réaffichages.
Select From List By Label demande_type Demande de modification
+ Wait Until Element Is Visible css=.reference_cadastrale_custom_fields
Wait Until All JavaScript Finished # Si tout se passe trop vite, il y aura encore l'ancienne valeur
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
Execute Javascript getDataFieldReferenceCadastrale();
${refad_from_fields} = Get Value terrain_references_cadastrales
@@ -1131,9 +1144,10 @@
Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
# Check fonctionnement des boutons
- Click Element css=#moreFieldReferenceCadastrale0
- Click Element css=#moreFieldReferenceCadastrale1
- Page Should Contain Element
+ Click Element Until New Element css=#moreFieldReferenceCadastrale0 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(7)
+ Click Element Until New Element css=#moreFieldReferenceCadastrale1 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(14)
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=12
Execute Javascript getDataFieldReferenceCadastrale();
Textarea Value Should Be css=#terrain_references_cadastrales
@@ -1141,15 +1155,18 @@
# Changement de type pour réafficher les champs
Select From List By Label dossier_autorisation_type_detaille Recours gracieux
+ Wait Until Element Is Visible css=.reference_cadastrale_custom_fields
Wait Until All JavaScript Finished
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
# Check fonctionnement des boutons
- Click Element css=#moreFieldReferenceCadastrale0
- Click Element css=#moreFieldReferenceCadastrale1
- Page Should Contain Element
+ Click Element Until New Element css=#moreFieldReferenceCadastrale0 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(7)
+ Click Element Until New Element css=#moreFieldReferenceCadastrale1 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(14)
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=12
Execute Javascript getDataFieldReferenceCadastrale();
Textarea Value Should Be css=#terrain_references_cadastrales
@@ -1169,12 +1186,14 @@
Open Fieldset dossier_instruction demandeur
Open Fieldset dossier_instruction localisation
# Check nombre et contenu des champs. Et que le JS peut bien les lire.
- Page Should Contain Element
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=8
# Check fonctionnement des boutons
- Click Element css=#moreFieldReferenceCadastrale0
- Click Element css=#moreFieldReferenceCadastrale1
- Page Should Contain Element
+ Click Element Until New Element css=#moreFieldReferenceCadastrale0 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(7)
+ Click Element Until New Element css=#moreFieldReferenceCadastrale1 css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field:nth-child(14)
+ Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL}
+ ... Page Should Contain Element
... css=.reference_cadastrale_custom_fields > .reference_cadastrale_custom_field limit=12
Execute Javascript getDataFieldReferenceCadastrale();
Textarea Value Should Be css=#terrain_references_cadastrales
@@ -1449,8 +1468,8 @@
# être recalculées)
# au changement du type détaillé de DA : type DA
Select From List By Label css=#dossier_autorisation_type_detaille Permis de construire comprenant ou non des démolitions
- ${passed} = Run Keyword And Return Status Element Should Be Visible css=#demande_type
- Run Keyword If ${passed} Select From List By Label css=#demande_type Dépôt Initial
+ Wait Until Element Is Visible css=#demande_type
+ Select From List By Label css=#demande_type Dépôt Initial
Wait Until Form Value Should Be css=#num_doss_type_da PC
Select From List By Label css=#dossier_autorisation_type_detaille Permis de démolir
Wait Until Form Value Should Be css=#num_doss_type_da PD
@@ -1486,8 +1505,8 @@
Wait Until Keyword Succeeds ${TIMEOUT} ${RETRY_INTERVAL} Element Should Contain
... css=#petitionnaire_principal_delegataire .synthese_demandeur TOLIN PATRICK
Select From List By Label css=#dossier_autorisation_type_detaille Permis de construire comprenant ou non des démolitions
- ${passed} = Run Keyword And Return Status Element Should Be Visible css=#demande_type
- Run Keyword If ${passed} Select From List By Label css=#demande_type Dépôt Initial
+ Wait Until Element Is Visible css=#demande_type
+ Select From List By Label css=#demande_type Dépôt Initial
Activer la saisie du numéro de dossier
Wait Until Form Value Should Be css=#num_doss_type_da PC
# Même numérotation mais pas même division car l'affectation auto ne concerne
@@ -1496,6 +1515,7 @@
Wait Until Form Value Should Be css=#num_doss_sequence 2
Désactiver la saisie du numéro de dossier
Select From List By Label css=#dossier_autorisation_type_detaille Permis de construire pour une maison individuelle et / ou ses annexes
+ Wait Until Element Is Visible css=input#date_demande
Activer la saisie du numéro de dossier
Wait Until Form Value Should Be css=#num_doss_type_da PC
Wait Until Form Value Should Be css=#num_doss_division ${isolation_values.division_code}
@@ -1520,6 +1540,7 @@
# change pas la valeur s'il manque des données pour la calculer)
Désactiver la saisie du numéro de dossier
Select From List By Label css=#om_collectivite choisir Collectivité
+ Wait Until Element Is Visible css=input#date_demande
Activer la saisie du numéro de dossier
Wait Until Form Value Should Be css=#num_doss_code_depcom ${EMPTY}
Wait Until Form Value Should Be css=#num_doss_division ${EMPTY}
@@ -1529,6 +1550,7 @@
Input text css=#date_demande ${date_jour}
Select From List By Label css=#dossier_autorisation_type_detaille Permis de construire pour une maison individuelle et / ou ses annexes
Select From List By Label css=#om_collectivite ${isolation_values.om_collectivite_libelle}
+ Wait Until Element Is Visible css=input#date_demande
Input text css=#num_doss_division ${isolation_values.division_code}
Input text css=#num_doss_sequence 9999
Click On Submit Button Until Message Création du dossier d'instruction n