From 7c5245638ed9670a309ee70da48f7b242ae7374b Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Thu, 13 Jun 2024 15:34:22 +0200 Subject: [PATCH] =?UTF-8?q?4-08=20m=C3=AAme=20modifications=20que=204-07?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paheko.side | 463 ++++++++++++++++------------------------------------ 1 file changed, 144 insertions(+), 319 deletions(-) diff --git a/paheko.side b/paheko.side index e43d1b8..94ca17f 100644 --- a/paheko.side +++ b/paheko.side @@ -11948,311 +11948,304 @@ "value": "" }] }, { - "id": "b4dbdd44-85f5-4582-92ab-b1c5cddc98f0", + "id": "5a7f0fc2-fc66-46b2-a5f6-0d97c61d515a", "name": "4-08 lister membres tri ville décroissant", "commands": [{ - "id": "f18bbfc0-b209-491b-960b-9ce82ef4631f", + "id": "2adca38d-1ea3-4cd0-bfec-fc628e607950", "comment": "", "command": "open", "target": "http://test.paheko.localhost/admin/", "targets": [], "value": "" }, { - "id": "10a8f3f2-23d8-4400-a8f6-43fd4cc29a23", + "id": "737e9a28-1494-4147-b8bf-bbd4dcd8079f", "comment": "", "command": "setWindowSize", "target": "1280x1020", "targets": [], "value": "" }, { - "id": "4df0c7ad-36f9-4dba-bcd6-b01c3d6ca54e", + "id": "73c8eb2b-40d4-473a-8626-07a741311e8f", "comment": "Vérifier si déjà connecté", "command": "storeXpathCount", "target": "xpath=//button[@name='login']", "targets": [], "value": "connecte" }, { - "id": "f795821e-345d-4710-9a1b-189db808ee86", + "id": "212ee57f-6630-4187-a1c4-5f9d735936bf", "comment": "", "command": "if", "target": "${connecte} > 0", "targets": [], "value": "" }, { - "id": "846c8361-7c1b-4ef8-93a7-606f0a7408ca", + "id": "65f044d2-17bc-4876-b845-433d2cb7b685", "comment": "identifiant", "command": "type", "target": "id=f_id", "targets": [], "value": "jckix@free.fr" }, { - "id": "26c5eac2-c569-4b6c-8507-8c46a1adabd9", + "id": "23bbde8d-4f4c-494c-9c83-6eb2353bf1af", "comment": "mot de passe", "command": "type", "target": "id=f_password", "targets": [], "value": "interpeller noircir colis allumer" }, { - "id": "8355fda6-8e0d-4570-b4f0-825c6ef99c50", + "id": "5921b0e0-5d51-4625-9060-e8dbd1045940", "comment": "Connexion", "command": "click", "target": "name=login", "targets": [], "value": "" }, { - "id": "ab836405-b492-43cf-94f1-6b706db7995a", + "id": "7b851ff1-736d-46c6-a44b-45af16777640", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "43977eb3-2f4f-4b82-9a46-77476189278d", + "id": "90ee7c7b-8f5a-4c95-858c-2e66d9910bb0", "comment": "Traiter les membres déjà présents", "command": "", "target": "", "targets": [], "value": "" }, { - "id": "cbea625c-28c9-47fb-826c-ec2a2825992c", + "id": "9df02c79-c077-4bf9-863c-9bcd18ae5196", "comment": "Init liste des numéros", "command": "executeScript", "target": "return []", "targets": [], "value": "lesnumeros" }, { - "id": "957c6ceb-7222-443b-bb54-9400c7df66d6", + "id": "6dc8b579-9693-41f0-9e46-b734955815a4", "comment": "Init liste des noms", "command": "executeScript", "target": "return []", "targets": [], "value": "lesnoms" }, { - "id": "5c54cac1-8ca5-44bf-a606-197d39057f6c", + "id": "0d8840d1-e4f6-4ec1-986f-06a3fe956bfd", "comment": "Init liste des villes", "command": "executeScript", "target": "return []", "targets": [], "value": "lesvilles" }, { - "id": "65524a72-3eea-487e-bb16-e7c7244b3320", + "id": "0417d01e-25b8-4dc6-8275-736b7d69d2ac", "comment": "Menu Membres", "command": "click", "target": "xpath=//a[contains(@href, '/admin/users')]", "targets": [], "value": "" }, { - "id": "cad647db-20c6-4833-b22b-8c13f59cc353", + "id": "1ad17670-aecc-4cad-80d2-d7455e84b282", "comment": "Rendre visibles les options du menu Filtrer", "command": "executeScript", "target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;", "targets": [], "value": "" }, { - "id": "2259d20d-7f36-4d00-9654-087390b41c07", + "id": "1d8a6143-d7b1-4acb-89a4-28f03bed8bc8", "comment": "", "command": "storeText", "target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small", "targets": [], "value": "membres" }, { - "id": "08b2e2df-6731-44b6-b258-3a3d6f7e5c49", + "id": "d7b2d256-fb66-42c5-af3e-7422b92cca86", "comment": "Nombre de membres", "command": "executeScript", "target": "return Number(${membres}.split(/ /)[0])", "targets": [], "value": "nb_total_membres" }, { - "id": "e78ada31-2f14-49a1-9c3d-897aee1c4deb", + "id": "39129d1b-c39b-4bae-9223-70ac0b4bc899", "comment": "Filtrer : toutes même cachées", "command": "click", "target": "xpath=//a[contains(., \"Toutes, même cachées\")]", "targets": [], "value": "" }, { - "id": "4a75e960-8055-437d-be3e-2c5d4c9b1639", + "id": "06820e63-1f34-4f1f-866c-caca5c1c3232", "comment": "Nombre de membres sur la page", "command": "storeXpathCount", "target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span", "targets": [], "value": "nb_membres_page" }, { - "id": "e998d233-90a5-472a-9d64-bc4f0e42bd8f", + "id": "a12ae177-3cb6-4354-b236-da5e4c4b6ff4", "comment": "", "command": "executeScript", "target": "return 1", "targets": [], "value": "num" }, { - "id": "98ffe456-98d9-4eaf-89b9-55576d228e68", + "id": "910acc09-f70e-441a-9705-0539aef5f387", "comment": "", "command": "executeScript", "target": "return ${nb_total_membres}", "targets": [], "value": "nb_membres" }, { - "id": "4eb88574-0302-481b-b270-e5f021c48238", + "id": "73cb7d66-2d3d-4cb5-a384-f1441a7f1181", "comment": "Parcourir les membres enregistrés", "command": "while", "target": "${num} <= ${nb_membres}", "targets": [], "value": "" }, { - "id": "61d3c023-d677-497e-a745-b622a5476442", + "id": "aaddbcfa-7588-465d-acb7-82265c0ecfb6", "comment": "fin de page ?", "command": "if", "target": "${num} > ${nb_membres_page}", "targets": [], "value": "" }, { - "id": "fb574a22-5f52-48c3-a74d-8d46bc6a1556", + "id": "3445cd64-f0ce-44b2-ad98-a8926cad4360", "comment": "passer à la page suivante", "command": "click", "target": "xpath=//li[@class=\"next\"]//a", "targets": [], "value": "" }, { - "id": "440e11b4-bfa0-49c4-a7b2-40a09fc8e9f9", + "id": "9f7e3e94-6d8a-48c1-bc36-51187c93aa46", "comment": "", "command": "executeScript", "target": "return ${nb_membres} - ${nb_membres_page}", "targets": [], "value": "nb_membres" }, { - "id": "c368091f-3b4e-4fdd-b91e-64907cd54c2f", + "id": "26b2d931-ead3-462e-ad8e-c5d8f7eec59e", "comment": "", "command": "executeScript", "target": "return 1", "targets": [], "value": "num" }, { - "id": "78862996-e629-4bc1-ac22-a1ee475ce0f9", + "id": "e23f04a8-67a4-4edb-831e-848cbc139715", "comment": "Nombre de membres sur la page", "command": "storeXpathCount", "target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span", "targets": [], "value": "nb_membres_page" }, { - "id": "17daf49e-788a-4b99-a48e-3a1007ca74bc", + "id": "843e6a4a-13b2-4f0a-9704-3043762f3392", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "207e0ee7-d71b-4b88-8c27-ba25dfaefdb4", + "id": "f69384ca-87b9-4138-8e70-e7cc0cd7f90b", "comment": "numéro affiché", "command": "storeText", "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span", "targets": [], "value": "numeroAffiche" }, { - "id": "a469fa11-01c9-477b-aef4-b45a1862660b", + "id": "1dec6f5d-b921-474d-be0e-abfef7eef3b4", "comment": "Ajouter numéro à la liste", "command": "executeScript", "target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))", "targets": [], "value": "lesnumeros" }, { - "id": "60883057-f653-4a90-965d-61a6c354ed1f", + "id": "db73c987-7e29-4e86-ab02-e05be7cec7a3", "comment": "nom affiché", "command": "storeText", "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span", "targets": [], "value": "nomAffiche" }, { - "id": "ca0623b7-fc61-4c5b-b055-71c8fe7a263c", + "id": "8005d2b5-71e0-423c-b1ca-590310cf5c4f", "comment": "Ajouter nom à la liste", "command": "executeScript", "target": "return ${lesnoms}.concat(${nomAffiche})", "targets": [], "value": "lesnoms" }, { - "id": "08860466-3451-4346-bda7-59a4704a9ef8", + "id": "57c9fa14-332f-4d6d-bdb8-61f94b994269", "comment": "ville affichée", "command": "storeText", "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td", "targets": [], "value": "villeAffichee" }, { - "id": "f9518b69-c9e0-4905-9bb8-20f62f8d9b19", + "id": "2bd1c5c9-de28-4ce3-a474-bd2ab1331095", "comment": "Ajouter ville à la liste", "command": "executeScript", "target": "return ${lesvilles}.concat(${villeAffichee})", "targets": [], "value": "lesvilles" }, { - "id": "a0e4ddd1-bc0a-4548-a03a-6c959f7972b7", - "comment": "", - "command": "//echo", - "target": "${numeroAffiche} : ${nomAffiche}, ${villeAffichee}", - "targets": [], - "value": "" - }, { - "id": "2aef3ab7-64d2-4841-b13c-bcdfdf4a7692", + "id": "a22eb2f8-9db8-4378-a407-52a860ee78ca", "comment": "", "command": "executeScript", "target": "return ${num} + 1", "targets": [], "value": "num" }, { - "id": "ac835e27-6736-434c-ac2c-98e6b0fe223d", + "id": "20734489-00f2-4b23-a95b-7ae765a92754", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "19a813db-0d93-4dc1-933f-13eec6986e23", + "id": "9a9120d0-0391-4a29-9460-e2998f9da880", "comment": "Générer de nouveaux membres", "command": "", "target": "", "targets": [], "value": "" }, { - "id": "4dae7f9a-5caf-4fa9-bf63-7a80d0e322a8", + "id": "033c0f01-eb55-413e-8447-0b3363537f72", "comment": "si pas assez de membres", "command": "if", - "target": "${nb_total_membres} < 20", + "target": "${nb_total_membres} < 10", "targets": [], "value": "" }, { - "id": "ced91aaf-ed2a-4212-9732-2f7e8f3ee556", + "id": "3075ce2b-597e-44bc-8f1b-572333fb08a0", "comment": "Ajouter nouveaux noms à la liste", "command": "executeScript", - "target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};", + "target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(5 + Math.floor(Math.random() * 5))); } return ${lesnoms};", "targets": [], "value": "lesnoms" }, { - "id": "991b6f81-a9f6-4f7b-b2b1-21e99a2cf684", + "id": "be2f471e-266f-4181-afb0-03e66b877c81", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "e8da6de4-d196-4359-b91a-8eb283542eb7", + "id": "a99ea17d-3a32-462d-b48e-2f49a1970985", "comment": "", "command": "executeScript", "target": "return ${nb_total_membres}", "targets": [], "value": "i" }, { - "id": "522e071b-c405-482f-bbaf-323fd52921cf", + "id": "51e1f97d-bb62-4ca1-8baa-eb6e4a0dea64", "comment": "", "command": "executeScript", "target": "return ${lesnoms}.length", "targets": [], "value": "nb_noms" }, { - "id": "fa903e0c-e0dc-43fd-b8c5-233214966d33", + "id": "d1bac523-969c-4299-b63a-19817f095b7d", "comment": "Parcourir liste noms pour ajout dans la base", "command": "while", "target": "${i} < ${nb_noms}", "targets": [], "value": "" }, { - "id": "d4ad55f7-ff04-4996-b76e-4139abbfa038", + "id": "a860d28e-b9a8-4512-bdbb-58b25e22a24a", "comment": "Menu ajouter", "command": "click", "target": "xpath=//a[contains(@href, '/admin/users/new.php')]", @@ -12266,28 +12259,28 @@ ], "value": "" }, { - "id": "abf3dd25-d287-4e2c-acc7-b004afd18346", + "id": "43b69119-55c8-403b-9145-33e0eab2bd8d", "comment": "Mémoriser numéro de membre", "command": "storeValue", "target": "id=f_numero", "targets": [], "value": "numero" }, { - "id": "1261e041-148b-4cbc-ba09-e3d7f3780458", + "id": "43d62230-c31c-4527-9eb1-df94d15444d8", "comment": "Ajouter numéro à la liste", "command": "executeScript", "target": "return ${lesnumeros}.concat(${numero})", "targets": [], "value": "lesnumeros" }, { - "id": "acac7ac2-05b5-4348-a3f7-a036f233484b", + "id": "afbe4d86-3c15-440a-86d3-26113aadf2ae", "comment": "", "command": "executeScript", "target": "return ${lesnoms}.at(${i})", "targets": [], "value": "nom" }, { - "id": "566b3622-6c8f-4dd0-a2d9-86fb5a3f738f", + "id": "16b2f774-8221-4131-8a2c-8d9d1bfe67c8", "comment": "Saisir le nom", "command": "type", "target": "id=f_nom", @@ -12300,28 +12293,21 @@ ], "value": "${nom}" }, { - "id": "ad6ec131-9a47-4dd1-9752-ec0b21fa844e", - "comment": "", - "command": "//echo", - "target": "Ajout de ${nom}", - "targets": [], - "value": "" - }, { - "id": "05cad3f0-1c19-4b50-801f-eeca4ece55a3", + "id": "b5639f59-dad7-4164-970b-2145828752f2", "comment": "Générer ville", "command": "executeScript", "target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)", "targets": [], "value": "ville" }, { - "id": "5b60919a-3387-4a64-935a-68205164307b", + "id": "8d2f09b4-6ad0-417b-8168-2a6855b60a0e", "comment": "Ajouter ville à la liste", "command": "executeScript", "target": "return ${lesvilles}.concat(${ville})", "targets": [], "value": "lesvilles" }, { - "id": "acca238a-287e-4159-85a4-fe530e89b96c", + "id": "ea7d2530-5639-4f39-8273-8169cdb83e54", "comment": "Saisir ville", "command": "type", "target": "id=f_ville", @@ -12334,7 +12320,7 @@ ], "value": "${ville}" }, { - "id": "b4120de2-f478-4110-8947-487a507fa242", + "id": "e3c0ec4e-3292-47a3-b28b-f528f0a9a527", "comment": "Enregistrer les infos", "command": "click", "target": "name=save", @@ -12347,525 +12333,364 @@ ], "value": "" }, { - "id": "872eb96c-70ba-4729-9d93-6ed988942590", + "id": "34907b24-b6b0-424e-a996-328d12f5bb40", "comment": "", "command": "executeScript", "target": "return ${i} + 1", "targets": [], "value": "i" }, { - "id": "c641af11-7f55-4b59-b57d-bb7bb9bf7ba5", + "id": "e93ea4ad-f7cf-4c61-a9de-937f58137e38", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "03f3d3a3-4396-47ba-8fba-5a1306573f8e", + "id": "4d827f8c-fc20-4586-ada5-81b6a208f1fb", "comment": "Trier les membres par ville décroissante", "command": "//executeScript", "target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } function extraire(tab) { let noms = []; tab.forEach((e) => { noms.push(e.noms); }); return noms; }; return extraire(trierVilles(${lesvilles}, ${lesnumeros}, false));", "targets": [], "value": "lesnoms_ville_desc" }, { - "id": "0023503d-e543-485f-b862-45a8f0d7dc73", + "id": "9a2f24a7-8a02-49d6-a76d-9d952f2bd72f", "comment": "Trier les membres par ville décroissante ; récupérer les numéros", "command": "executeScript", - "target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } function extraire(tab) { let numeros = []; tab.forEach((e) => { numeros.push(e.numero); }); return numeros; }; return extraire(trierVilles(${lesvilles}, ${lesnumeros}, false));", + "target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } function extraire(tab) { let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu; }; return extraire(trierVilles(${lesvilles}, ${lesnumeros}, false));", "targets": [], "value": "lesnumeros_ville_desc" }, { - "id": "bc83f76b-6880-4b8c-b216-00aad378010b", + "id": "1d207ec8-a772-4b5f-abe4-d5d752b59faf", "comment": "Trier les membres par ville décroissante ; récupérer les villes", "command": "executeScript", - "target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } function extraire(tab) { let villes = []; tab.forEach((e) => { villes.push(e.ville); }); return villes; }; return extraire(trierVilles(${lesvilles}, ${lesnumeros}, false));", + "target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } function extraire(tab) { let resu = []; tab.forEach((e) => { resu.push(e.ville); }); return resu; }; return extraire(trierVilles(${lesvilles}, ${lesnumeros}, false));", "targets": [], "value": "lesvilles_desc" }, { - "id": "06782579-ed24-440e-b7db-beaff5f964cf", - "comment": "Afficher les infos triées par ville décroissante", - "command": "//echo", - "target": "Tableau des noms triés", - "targets": [], - "value": "" - }, { - "id": "19c2b688-d6ff-43eb-85e0-c223e887b97b", - "comment": "", - "command": "//executeScript", - "target": "return 0", - "targets": [], - "value": "i" - }, { - "id": "758287a1-c882-46f1-8e74-edbda645df4c", - "comment": "", - "command": "//while", - "target": "${i} < ${lesnumeros_ville_desc}.length", - "targets": [], - "value": "" - }, { - "id": "a1035d84-2c9f-4b38-9972-1c7aeb444089", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnumeros_ville_desc}.at(${i})", - "targets": [], - "value": "num" - }, { - "id": "62fea885-7e95-4873-a3eb-80afe72ce37f", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnoms_ville_desc}.at(${i})", - "targets": [], - "value": "nom" - }, { - "id": "ddca3b07-262c-43cb-8502-d64d2ba7380a", - "comment": "", - "command": "//executeScript", - "target": "return ${lesvilles_desc}.at(${i})", - "targets": [], - "value": "ville" - }, { - "id": "2ca59398-a73d-4bdb-a6e1-40f55c499445", - "comment": "", - "command": "//echo", - "target": "${num} : ${ville}", - "targets": [], - "value": "" - }, { - "id": "ecde69db-c8d8-45f1-9af2-7c3a12b29b56", - "comment": "", - "command": "//executeScript", - "target": "return ${i} + 1", - "targets": [], - "value": "i" - }, { - "id": "4532ff23-a8e6-4125-9ca3-72d83fca1ee0", - "comment": "", - "command": "//end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "fa3327cf-b38c-4c9a-b396-4ecf8808aedd", + "id": "50cea963-0984-4735-aeb7-7327ce169087", "comment": "Vérifier les membres", "command": "", "target": "", "targets": [], "value": "" }, { - "id": "563829c6-8bd3-4c85-9fee-c91dfa120ef3", + "id": "77a1f49e-91c0-4d59-9e41-c0e1dca518c4", "comment": "Menu membres", "command": "click", "target": "xpath=//a[contains(@href, '/admin/users')]", "targets": [], "value": "" }, { - "id": "88595fef-a914-4750-85e5-d0d686dd06d5", + "id": "2cc72bd8-97dc-4a12-bdbb-a2e84eb35d52", "comment": "Rendre visibles les options du menu Filtrer", "command": "executeScript", "target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;", "targets": [], "value": "" }, { - "id": "720fa71a-37b6-4b86-bd46-c4d55d131621", + "id": "ec030de1-caa1-4e5e-8c16-eb0a168b288b", "comment": "nombre de membres dans ces catégories", "command": "storeText", "target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small", "targets": [], "value": "membres" }, { - "id": "89cc3732-484f-4038-a9eb-8d09277f1b10", + "id": "715f4a69-c061-4446-95a6-5d6a13ca498f", "comment": "idem", "command": "executeScript", "target": "return Number(${membres}.split(/ /)[0])", "targets": [], "value": "nb_membres_cat" }, { - "id": "330bea1a-90dd-4025-91b8-e727ae097296", + "id": "7d7de33a-3682-4c5b-84fd-2457f7d8b4fd", "comment": "Vérifier nombre de membres", "command": "assert", "target": "nb_noms", "targets": [], "value": "${nb_membres_cat}" }, { - "id": "6031c07d-0363-4d65-913a-109238808da6", + "id": "eae64af8-25b8-4232-a976-1e530e1dd6ad", "comment": "Filtrer : toutes catégories même cachées", "command": "click", "target": "xpath=//a[contains(., \"Toutes, même cachées\")]", "targets": [], "value": "" }, { - "id": "6576bec2-0b4c-41f2-9463-21b44cbc44d2", + "id": "01d80644-1171-4f0e-aec7-2aee6524270a", "comment": "Nombre de membres sur la page", "command": "storeXpathCount", "target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span", "targets": [], "value": "nb_membres_page" }, { - "id": "3cc0162d-a284-4ab4-9aa6-6765737e32ea", - "comment": "Trier par ville décroissant", + "id": "eb700fcd-a9ad-4f0e-b3b9-e39ad7d96b22", + "comment": "Trier par ville", "command": "click", "target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]", "targets": [], "value": "" }, { - "id": "388130a3-38cc-4a2c-99be-8e6fca72e618", + "id": "f82dd30f-c9d9-4bed-b1a9-1f7274ce79f6", "comment": "inverser le tri s'il est en ordre croissant", "command": "", "target": "", "targets": [], "value": "" }, { - "id": "abedae76-c870-4648-8bfc-aaccad4bed75", + "id": "65d23448-4184-48e6-b69f-91bfdc1e80ea", "comment": "au moins 2 membres", "command": "if", "target": "${nb_membres_cat} >= 2", "targets": [], "value": "" }, { - "id": "160d1fcb-0d69-4bbc-aa04-6091e6177795", + "id": "c8846e14-0b3f-4e45-8cfd-91aceb587006", "comment": "", - "command": "executeScript", - "target": "return 1", - "targets": [], - "value": "num" - }, { - "id": "7fa9142b-5676-40e2-a6a5-71c30f49ff72", - "comment": "chercher la première ville non vide", - "command": "", - "target": "", - "targets": [], - "value": "" - }, { - "id": "114dd279-0fd2-410a-abd4-0d7279b3f8ca", - "comment": "", - "command": "while", - "target": "${num} <= ${nb_membres_page}", - "targets": [], - "value": "" - }, { - "id": "529170e6-82e0-4f28-a415-18d655fd0c1d", - "comment": "première ville", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[1]", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[3]", "targets": [], - "value": "premier" + "value": "premiere_ville" }, { - "id": "e9c0382f-042d-48c8-8ec4-ad6fce232b41", + "id": "e30c5ac7-db03-448a-a008-137ab8630ed1", "comment": "", - "command": "if", - "target": "${premier} != \"\"", - "targets": [], - "value": "" - }, { - "id": "86b7d6f7-39e4-48e2-921b-8d2863a5e743", - "comment": "trouvé", - "command": "executeScript", - "target": "return ${nb_membres_page} + 1", - "targets": [], - "value": "num" - }, { - "id": "1fe4924b-e542-4936-b34d-35bb18a51772", - "comment": "", - "command": "else", - "target": "", - "targets": [], - "value": "" - }, { - "id": "17832c29-498e-4101-a47c-f43e1e7b9b6f", - "comment": "", - "command": "executeScript", - "target": "return ${num} + 1", - "targets": [], - "value": "num" - }, { - "id": "f320b91f-b525-4f0f-9e8c-14294eab9816", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "27cfce8f-9250-4158-97f1-346f9b681685", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "9f826487-00b1-4382-922f-2c8113101415", - "comment": "chercher la dernière ville non vide", - "command": "", - "target": "", - "targets": [], - "value": "" - }, { - "id": "306f8ecb-8be2-49c3-a116-194fd09d272a", - "comment": "", - "command": "executeScript", - "target": "return ${nb_membres_page}", - "targets": [], - "value": "num" - }, { - "id": "73536ecf-6e06-47be-9d15-a05a7ceb5097", - "comment": "", - "command": "while", - "target": "${num} > 0", - "targets": [], - "value": "" - }, { - "id": "c0e913b6-6227-4928-98b5-46af10e7f101", - "comment": "dernière ville", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[1]", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/td[3]", "targets": [], - "value": "dernier" + "value": "derniere_ville" }, { - "id": "4f0baad0-5d12-4d0a-b4b6-ff5bea15e671", + "id": "6cb020d5-e62e-4f07-8498-eabf33fa6b10", "comment": "", "command": "if", - "target": "${dernier} != \"\"", + "target": "(${premiere_ville} == \"\" && ${derniere_ville} == \"\") || (${premiere_ville} != \"\" && ${derniere_ville} != \"\")", "targets": [], "value": "" }, { - "id": "76844ccc-5841-4341-b110-263fdf7ef745", - "comment": "trouvé", - "command": "executeScript", - "target": "return 0", - "targets": [], - "value": "num" - }, { - "id": "1cec39ad-3990-4b04-ac80-af51633358c3", + "id": "e3b1badf-b520-4752-9978-b4f2da6732cf", "comment": "", - "command": "else", - "target": "", + "command": "storeText", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span", "targets": [], - "value": "" + "value": "numero1" }, { - "id": "3106be79-2e97-46b2-a669-ee7325860cda", + "id": "3c772754-2d27-45f5-b983-9a6174a29b0f", + "comment": "", + "command": "storeText", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/td[@class=\"num\"]//span", + "targets": [], + "value": "numero2" + }, { + "id": "266d3345-5e03-462b-aa91-6432d0b71a5c", "comment": "", "command": "executeScript", - "target": "return ${num} - 1", + "target": "return Number(${numero1})", "targets": [], - "value": "num" + "value": "numero_premier" }, { - "id": "316e24a6-6d61-4228-bd95-9190bcda78b6", + "id": "47058551-e469-4b86-a017-be71943bb26d", "comment": "", - "command": "end", - "target": "", + "command": "executeScript", + "target": "return Number(${numero2})", "targets": [], - "value": "" + "value": "numero_dernier" }, { - "id": "394cfbd7-cfcb-4e36-aad9-4f3bdf790fc9", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "36d5ec45-e610-4b48-bcc7-1297895d2ef3", - "comment": "", - "command": "//echo", - "target": "premier = ${premier}, dernier = ${dernier}", - "targets": [], - "value": "" - }, { - "id": "a1c29e13-c127-4522-94ad-2b6dfeb62804", + "id": "7c42a817-ae56-4347-b351-918423053ae5", "comment": "", "command": "if", - "target": "${premier}.localeCompare(${dernier}) < 0", + "target": "${numero_premier} < ${numero_dernier}", "targets": [], "value": "" }, { - "id": "aabcb85a-015e-496e-811a-2426b1dfa94b", + "id": "1e82aa24-b9fd-481a-b621-134c05d9fe31", "comment": "Inverser le sens de tri", "command": "click", "target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]", "targets": [], "value": "" }, { - "id": "a2369825-8e86-44cc-90fd-4178347f8759", + "id": "eab0fcca-6e87-4bbd-9fb4-70a3d29fd9be", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "7fb1f57b-078a-45e7-8df7-2d7fdfe2836c", + "id": "5446b42d-0628-4a7f-bf6b-dd2108b0c891", + "comment": "", + "command": "elseIf", + "target": "${premiere_ville} != \"\" && ${derniere_ville} == \"\"", + "targets": [], + "value": "" + }, { + "id": "df2b1e99-7589-4a52-aefa-b472fcd9982d", + "comment": "Inverser le sens de tri", + "command": "click", + "target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]", + "targets": [], + "value": "" + }, { + "id": "25aa53d3-a6d2-4ced-882a-ae8388cd6c55", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "85d52d26-6a82-457e-ba96-e9a0dec35fba", + "id": "5ba2d9af-aea6-49dd-9671-d66b0080bde1", "comment": "", - "command": "//echo", - "target": "nombre de membres sur la page = ${nb_membres_page}", + "command": "end", + "target": "", "targets": [], "value": "" }, { - "id": "19a6c7e9-267c-40f8-9de1-358be594c1f3", + "id": "a75aa56c-25f1-4ce3-9eb0-9ce6278508a6", "comment": "", "command": "executeScript", "target": "return 1", "targets": [], "value": "num" }, { - "id": "b98a684d-0991-4cc9-9c89-e3d0362c7649", + "id": "c624c87a-7900-4c16-9cfd-2fcc97b86229", "comment": "", "command": "executeScript", "target": "return 0", "targets": [], "value": "i" }, { - "id": "f7d4aad1-1f57-4bef-8012-583903e3d918", + "id": "be6e8e77-2934-4a1d-93e4-dcfef0dfd642", "comment": "Parcourir les membres enregistrés", "command": "while", "target": "${num} <= ${nb_membres_cat}", "targets": [], "value": "" }, { - "id": "b981d233-8893-40e6-b0bb-fddb77e3ef01", + "id": "5e87b647-5010-4833-a995-23dfa0d7ef10", "comment": "fin de page ?", "command": "if", "target": "${num} > ${nb_membres_page}", "targets": [], "value": "" }, { - "id": "309615fd-cad7-410c-af95-67a91f52ae2d", + "id": "8d33d644-ad6e-474e-b7c7-a300b1a7861a", "comment": "passer à la page suivante", "command": "click", "target": "xpath=//li[@class=\"next\"]//a", "targets": [], "value": "" }, { - "id": "7d61680e-6f80-4cfa-aec9-7613aecdfba2", + "id": "6b730630-76ce-44da-9f13-e725213d7989", "comment": "", "command": "executeScript", "target": "return ${nb_membres_cat} - ${nb_membres_page}", "targets": [], "value": "nb_membres_cat" }, { - "id": "fb19ed66-7852-4a88-b2fe-7276d4f77d78", + "id": "541659b3-9207-49e7-9568-f8ce4b44cdda", "comment": "", "command": "executeScript", "target": "return 1", "targets": [], "value": "num" }, { - "id": "9f423237-405f-425b-a79e-b21aeeb86732", + "id": "630f7f6a-3dff-4206-a8bd-6d9ad5737e02", "comment": "", "command": "storeXpathCount", "target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span", "targets": [], "value": "nb_membres_page" }, { - "id": "3e108282-eec6-44e6-9a20-d2377411db82", + "id": "575b0a80-de06-4081-b0a9-0ad8f23b8e41", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "e42a9e63-2137-47bb-a458-82f7ec55de7d", + "id": "b4384b15-5774-49f1-9627-3d24e57fa503", "comment": "numéro affiché", "command": "storeText", "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span", "targets": [], "value": "numeroAffiche" }, { - "id": "bc11f3af-32c6-4085-914a-0dad618f31ba", + "id": "c82a67e3-89fd-454c-bef2-897e3595fef2", "comment": "nom affiché", "command": "//storeText", "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span", "targets": [], "value": "nomAffiche" }, { - "id": "fb99c176-daf6-4b81-818e-033fa4d1c130", + "id": "0b490677-bc5a-4586-bb8f-26a324923cfe", "comment": "ville affichée", "command": "storeText", "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td", "targets": [], "value": "villeAffichee" }, { - "id": "75ef4af4-4bc9-478c-bc83-19cdf2b083ff", + "id": "0eecd8a3-4dda-4938-901a-19f1eb497add", "comment": "numéro mémorisé", "command": "executeScript", "target": "return ${lesnumeros_ville_desc}.at(${i})", "targets": [], "value": "numero" }, { - "id": "ccb1946b-381c-462a-bbda-66654df138b8", + "id": "bd0d55b3-06fa-4a27-968c-951e1487aedc", "comment": "nom mémorisé", "command": "//executeScript", "target": "return ${lesnoms_ville_desc}.at(${i})", "targets": [], "value": "nom" }, { - "id": "e9791f06-74ba-4637-9893-488065316988", + "id": "7ede4f3f-814c-4ba0-a421-575b26e183c1", "comment": "ville mémorisée", "command": "executeScript", "target": "return ${lesvilles_desc}.at(${i})", "targets": [], "value": "ville" }, { - "id": "d8996196-0481-471d-a728-ba122b8ef79f", - "comment": "", - "command": "//echo", - "target": "n=${num} ${numeroAffiche} ${nomAffiche} ${villeAffichee}", - "targets": [], - "value": "" - }, { - "id": "69cecc15-686f-4c54-907a-c73297d999a8", - "comment": "", - "command": "//echo", - "target": "i=${i} ${numero} ${nom} ${ville}", - "targets": [], - "value": "" - }, { - "id": "5128825a-c561-49ba-913f-91cf9f9c7dbb", + "id": "b5a2a7ed-47eb-48a7-b8b3-c1e9f95dc878", "comment": "", "command": "executeScript", "target": "return Number(${numeroAffiche})", "targets": [], "value": "numaff" }, { - "id": "cb4f26bf-3f59-4934-901a-59e5cbdf6ca4", + "id": "66dab4bc-1a14-4e73-95c2-e5a442589344", "comment": "", "command": "assert", "target": "numeroAffiche", "targets": [], "value": "${numero}" }, { - "id": "ad3f27d9-7c7b-408e-b095-c60e0608acd6", + "id": "fa76365f-cfa3-40b2-bc14-6a1c8841ac3c", "comment": "", "command": "//assert", "target": "nomAffiche", "targets": [], "value": "${nom}" }, { - "id": "a6e33c59-a6a0-4794-8012-9b1795ff5c8f", + "id": "85485983-7abf-4c22-8a72-530155702393", "comment": "", "command": "assert", "target": "villeAffichee", "targets": [], "value": "${ville}" }, { - "id": "23128815-d4b3-41da-8769-aa136aa8205d", + "id": "14644e54-14bb-45f2-820f-ff614ddfba8b", "comment": "", "command": "executeScript", "target": "return ${num} + 1", "targets": [], "value": "num" }, { - "id": "e2d1370e-7b24-4b9e-a7fc-f60704d0d884", + "id": "30dd102d-c9bb-4598-9144-330d53a0a62f", "comment": "", "command": "executeScript", "target": "return ${i} +1", "targets": [], "value": "i" }, { - "id": "507951a3-e3a2-49b5-8056-cbadf174a3ab", + "id": "95c3b63c-ad4a-42c5-8a98-8472ea971441", "comment": "", "command": "end", "target": "", @@ -17989,7 +17814,7 @@ "persistSession": false, "parallel": false, "timeout": 300, - "tests": ["9d3d8f41-bff5-472e-ac87-6de5f10b4655", "91ef7a3d-27a5-4d1a-bb91-5ffdb927bb64", "eba6c550-37b2-4e7e-9352-d50cd1aeb2bf", "2f1dd424-4188-4ff9-ba9b-63c1085b89d0", "8275ba53-edfc-40c6-ab55-2c9d9d76c10b", "1493219f-1880-4b77-8332-e780660d301e", "cbd065d0-2d2e-4433-b7b3-756af25bdbf5", "b4dbdd44-85f5-4582-92ab-b1c5cddc98f0", "e6dc8eef-f38a-482b-8128-f46648bffe42", "3d1fc496-8036-4948-af1e-607d5375e813", "25e25640-41c1-4a8c-a8f3-288fed7fb46e"] + "tests": ["9d3d8f41-bff5-472e-ac87-6de5f10b4655", "91ef7a3d-27a5-4d1a-bb91-5ffdb927bb64", "eba6c550-37b2-4e7e-9352-d50cd1aeb2bf", "2f1dd424-4188-4ff9-ba9b-63c1085b89d0", "8275ba53-edfc-40c6-ab55-2c9d9d76c10b", "1493219f-1880-4b77-8332-e780660d301e", "cbd065d0-2d2e-4433-b7b3-756af25bdbf5", "e6dc8eef-f38a-482b-8128-f46648bffe42", "3d1fc496-8036-4948-af1e-607d5375e813", "25e25640-41c1-4a8c-a8f3-288fed7fb46e", "5a7f0fc2-fc66-46b2-a5f6-0d97c61d515a"] }, { "id": "f7119734-cb63-4c70-b0d6-6c1ff8281761", "name": "test",