diff --git a/membres.side b/membres.side index 87602e0..d637824 100644 --- a/membres.side +++ b/membres.side @@ -29382,6 +29382,420 @@ "targets": [], "value": "" }] + }, { + "id": "4073d67e-c10e-4c4a-a994-b6c8e2520b19", + "name": "11-05 ajout champ calculé", + "commands": [{ + "id": "43132073-c6e7-4c99-b7da-0658b46446c4", + "comment": "", + "command": "open", + "target": "http://test.paheko.localhost/admin/login.php", + "targets": [], + "value": "" + }, { + "id": "1b6709af-a2b6-460b-b29c-819bfd6fd618", + "comment": "", + "command": "setWindowSize", + "target": "1280x1020", + "targets": [], + "value": "" + }, { + "id": "894f55ad-540c-4bfb-9f34-03c588633ece", + "comment": "Vérifier si déjà connecté", + "command": "storeXpathCount", + "target": "xpath=//button[@name='login']", + "targets": [], + "value": "connecte" + }, { + "id": "9562f6ec-639a-4b9e-a1e7-1451da275ff8", + "comment": "", + "command": "if", + "target": "${connecte} > 0", + "targets": [], + "value": "" + }, { + "id": "8d9e6045-92d1-42c8-a00c-96242921eb6e", + "comment": "identifiant", + "command": "type", + "target": "id=f_id", + "targets": [], + "value": "jckix@free.fr" + }, { + "id": "160c6189-35e4-44bb-afe5-26ce5a485eb1", + "comment": "mot de passe", + "command": "type", + "target": "id=f_password", + "targets": [], + "value": "interpeller noircir colis allumer" + }, { + "id": "d23d2c34-5c61-4ea7-8d00-e12a6012e7e1", + "comment": "Connexion", + "command": "click", + "target": "name=login", + "targets": [], + "value": "" + }, { + "id": "06d2a221-5f6a-459f-af9e-2684286c72e5", + "comment": "", + "command": "end", + "target": "", + "targets": [], + "value": "" + }, { + "id": "b3a42fdd-5ec9-4ad2-838f-d2dad7ffff16", + "comment": "ajouter champ perso texte choix multiple", + "command": "", + "target": "", + "targets": [], + "value": "" + }, { + "id": "784c5d62-6b1c-4a0e-ad41-e9ed6070ac9b", + "comment": "", + "command": "click", + "target": "xpath=//a[contains(@href, \"/admin/config/\")]", + "targets": [ + ["css=li:nth-child(6) b", "css:finder"], + ["xpath=//li[6]/h3/a/b", "xpath:position"], + ["xpath=//b[contains(.,'Configuration')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "64a0066a-a471-4b37-9a66-102c338092e6", + "comment": "", + "command": "click", + "target": "xpath=//a[contains(@href, \"/admin/config/users\")]", + "targets": [ + ["css=ul:nth-child(1) > li:nth-child(3) > a", "css:finder"], + ["xpath=//a[contains(text(),'Membres')]", "xpath:link"], + ["xpath=//a[@href='http://test.paheko.localhost/admin/config/users/']", "xpath:href"], + ["xpath=//nav/ul/li[3]/a", "xpath:position"] + ], + "value": "" + }, { + "id": "ba251808-0312-433a-9f34-378526b3aace", + "comment": "", + "command": "click", + "target": "xpath=//a[contains(@href, \"/admin/config/fields\")]", + "targets": [ + ["css=ul:nth-child(1) > li:nth-child(3) > a", "css:finder"], + ["xpath=//a[contains(text(),'Membres')]", "xpath:link"], + ["xpath=//a[@href='http://test.paheko.localhost/admin/config/users/']", "xpath:href"], + ["xpath=//nav/ul/li[3]/a", "xpath:position"] + ], + "value": "" + }, { + "id": "55848734-2ab0-4a06-ae61-f3072ef934fe", + "comment": "", + "command": "click", + "target": "xpath=//a[@href=\"new.php\"]", + "targets": [], + "value": "" + }, { + "id": "1d6548d4-8719-4ee9-9c78-ce86e36f2131", + "comment": "", + "command": "click", + "target": "xpath=//button[@name=\"add\"]", + "targets": [ + ["name=save", "name"], + ["css=.main", "css:finder"], + ["xpath=//button[@name='save']", "xpath:attributes"], + ["xpath=//p/button", "xpath:position"], + ["xpath=//button[contains(.,'Enregistrer')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "79820c8d-ebf5-4ec5-a6cd-1be38e27b66c", + "comment": "champ calculé", + "command": "click", + "target": "xpath=//select[@id=\"f_type\"]/option[@value=\"virtual\"]", + "targets": [], + "value": "" + }, { + "id": "235e4bff-0249-4d6e-9ae4-a5ce6cc3a427", + "comment": "", + "command": "store", + "target": "Bizarre", + "targets": [], + "value": "libelle_champ" + }, { + "id": "e55eb32a-3681-4590-bd8a-e76a6ae0a4a3", + "comment": "", + "command": "type", + "target": "xpath=//input[@id=\"f_label\"]", + "targets": [], + "value": "${libelle_champ}" + }, { + "id": "4a406c1e-39dd-4a7a-b2fd-1b6cefe1ccf1", + "comment": "", + "command": "storeText", + "target": "id=f_name", + "targets": [], + "value": "id_champ" + }, { + "id": "b9902c7a-3989-40f1-98fd-0d5ec43dc1d0", + "comment": "", + "command": "store", + "target": "CASE WHEN length(nom) < 5 THEN 777 ELSE unicode(substr(nom, 1)) + unicode(substr(nom, 2)) + unicode(substr(nom, 3)) + unicode(substr(nom, 4)) + unicode(substr(nom, 5)) END", + "targets": [], + "value": "formule" + }, { + "id": "4fc2a40f-01a7-4bb1-9c1c-aaba5ff94e78", + "comment": "", + "command": "type", + "target": "id=f_sql", + "targets": [], + "value": "${formule}" + }, { + "id": "cb83cdce-ee0a-4437-9675-a44336f5c3dd", + "comment": "", + "command": "click", + "target": "xpath=//button[@name=\"save\"]", + "targets": [], + "value": "" + }, { + "id": "27606508-47ab-45b0-b44c-8183df26709a", + "comment": "", + "command": "assertElementPresent", + "target": "xpath=//p[contains(@class,\"confirm\")]", + "targets": [], + "value": "" + }, { + "id": "c76f4cf1-0ee2-45c5-b50d-f5128b37dac1", + "comment": "", + "command": "assertElementPresent", + "target": "xpath=//th[text()=\"${libelle_champ}\"]", + "targets": [], + "value": "" + }, { + "id": "21727fb6-1d55-4199-94f5-5ba284a74090", + "comment": "créer un membre", + "command": "", + "target": "", + "targets": [], + "value": "" + }, { + "id": "067e1761-1312-4d09-93dd-0c37fb6ec27a", + "comment": "", + "command": "click", + "target": "linkText=Ajouter", + "targets": [ + ["linkText=Ajouter", "linkText"], + ["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"], + ["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"], + ["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"], + ["xpath=//li/a", "xpath:position"], + ["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "731710ac-f8a7-4ebe-bdc9-5c9c0f8a5c97", + "comment": "", + "command": "storeValue", + "target": "id=f_numero", + "targets": [], + "value": "numero" + }, { + "id": "244e7f00-2901-4ce1-8622-c43f5f918349", + "comment": "", + "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;};return chaine(12)", + "targets": [], + "value": "nom" + }, { + "id": "83cb7c44-6163-4ad9-a763-9fd1409e2378", + "comment": "", + "command": "type", + "target": "id=f_nom", + "targets": [ + ["id=f_nom", "id"], + ["name=nom", "name"], + ["css=#f_nom", "css:finder"], + ["xpath=//input[@id='f_nom']", "xpath:attributes"], + ["xpath=//dd[3]/input", "xpath:position"] + ], + "value": "${nom}" + }, { + "id": "e46e1cdc-7346-4266-8c85-ac6b1e75fc82", + "comment": "", + "command": "executeScript", + "target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"", + "targets": [], + "value": "courriel" + }, { + "id": "495dcdd4-7098-4d76-8c0f-9b22910a1102", + "comment": "", + "command": "type", + "target": "id=f_email", + "targets": [ + ["id=f_email", "id"], + ["name=email", "name"], + ["css=#f_email", "css:finder"], + ["xpath=//input[@id='f_email']", "xpath:attributes"], + ["xpath=//dd[4]/input", "xpath:position"] + ], + "value": "${courriel}" + }, { + "id": "99be26e5-0285-40ba-9582-b43ea901999a", + "comment": "", + "command": "click", + "target": "name=save", + "targets": [ + ["name=save", "name"], + ["css=.main", "css:finder"], + ["xpath=//button[@name='save']", "xpath:attributes"], + ["xpath=//p/button", "xpath:position"], + ["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "6600b317-a1e9-461b-8839-0b9da366481b", + "comment": "vérifier infos membre", + "command": "", + "target": "", + "targets": [], + "value": "" + }, { + "id": "743d2afc-aa51-4491-b4e5-f39d06cf5ca1", + "comment": "", + "command": "assertText", + "target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd", + "targets": [], + "value": "${numero}" + }, { + "id": "05ce2500-8508-422b-bf6e-4fdac20a212e", + "comment": "", + "command": "assertText", + "target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd", + "targets": [], + "value": "${nom}" + }, { + "id": "756adc11-2421-411d-aec4-5537c9be96d4", + "comment": "", + "command": "assertText", + "target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a", + "targets": [], + "value": "${courriel}" + }, { + "id": "37b42cc8-b2cc-42d5-b79d-b9df5b20df69", + "comment": "", + "command": "executeScript", + "target": "function calculer(nb, chaine){ let somme = 0; for (let i = 0; i < nb; ++i) { somme += chaine.charCodeAt(i);\t} return somme; } return calculer(5, ${nom});", + "targets": [], + "value": "code" + }, { + "id": "4b0fc178-8b05-4f03-bd90-a16ea3e7fbdb", + "comment": "", + "command": "echo", + "target": "nom=${nom}, code=${code}", + "targets": [], + "value": "" + }, { + "id": "5e619452-54b7-465e-99bf-51e106b8bc33", + "comment": "", + "command": "assertText", + "target": "xpath=//dt[contains(.,\"${libelle_champ}\")]/following-sibling::dd", + "targets": [], + "value": "${code}" + }, { + "id": "2256aef1-4e16-49ac-a647-ac20ebff04b4", + "comment": "supprimer le champ ajouté", + "command": "", + "target": "", + "targets": [], + "value": "" + }, { + "id": "4b4fb86e-e444-452d-a5c0-db776f3efcff", + "comment": "", + "command": "click", + "target": "xpath=//a[contains(@href, \"/admin/config/\")]", + "targets": [ + ["css=li:nth-child(6) b", "css:finder"], + ["xpath=//li[6]/h3/a/b", "xpath:position"], + ["xpath=//b[contains(.,'Configuration')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "3d5c7385-27f1-48ed-8543-cc3d86653f55", + "comment": "", + "command": "click", + "target": "xpath=//a[contains(@href, \"/admin/config/users\")]", + "targets": [ + ["css=ul:nth-child(1) > li:nth-child(3) > a", "css:finder"], + ["xpath=//a[contains(text(),'Membres')]", "xpath:link"], + ["xpath=//a[@href='http://test.paheko.localhost/admin/config/users/']", "xpath:href"], + ["xpath=//nav/ul/li[3]/a", "xpath:position"] + ], + "value": "" + }, { + "id": "65098d50-8994-410f-94c0-8bda5da57599", + "comment": "", + "command": "click", + "target": "xpath=//a[contains(@href, \"/admin/config/fields\")]", + "targets": [ + ["css=ul:nth-child(1) > li:nth-child(3) > a", "css:finder"], + ["xpath=//a[contains(text(),'Membres')]", "xpath:link"], + ["xpath=//a[@href='http://test.paheko.localhost/admin/config/users/']", "xpath:href"], + ["xpath=//nav/ul/li[3]/a", "xpath:position"] + ], + "value": "" + }, { + "id": "96496f9d-a271-405d-8f01-2f841001ff87", + "comment": "", + "command": "storeXpathCount", + "target": "xpath=//tbody/tr", + "targets": [], + "value": "nb_champs" + }, { + "id": "cbc00a67-2a60-4055-98ed-f9b50d70d73d", + "comment": "", + "command": "click", + "target": "xpath=//tbody/tr[${nb_champs}]//td//a[contains(@href, \"delete.php\")]", + "targets": [], + "value": "" + }, { + "id": "a1fb3b80-ca8a-475b-912a-7b0cff9d8ce7", + "comment": "", + "command": "selectFrame", + "target": "index=0", + "targets": [ + ["index=0"] + ], + "value": "" + }, { + "id": "2848407a-eba5-46e7-938b-b262c66c94f8", + "comment": "", + "command": "click", + "target": "css=label", + "targets": [ + ["css=label", "css:finder"], + ["xpath=//label", "xpath:position"], + ["xpath=//label[contains(.,'Cocher cette case pour supprimer le champ, cela effacera de manière permanente cette donnée de toutes les fiches membres.')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "ee791676-1a15-4d0f-afbf-4b4a04ae8590", + "comment": "", + "command": "click", + "target": "name=delete", + "targets": [], + "value": "" + }, { + "id": "9eaa9a78-b307-463a-b9a2-cbfc39c36c26", + "comment": "", + "command": "selectFrame", + "target": "relative=parent", + "targets": [ + ["index=0"] + ], + "value": "" + }, { + "id": "53d9e84b-1c52-4288-a1d7-b1093a5d4728", + "comment": "", + "command": "assertElementNotPresent", + "target": "xpath=//th[text()=\"${libelle_champ}\"]", + "targets": [], + "value": "" + }] }], "suites": [{ "id": "6bdd4e16-7197-4388-9a5f-350523eb6c98", @@ -29459,7 +29873,7 @@ "persistSession": false, "parallel": false, "timeout": 300, - "tests": ["c548c5b3-dada-4e5d-af7f-2767bf5e2b6d", "3d0feea6-0edc-4669-ab3c-54f2b5d4ebca", "340b4d62-de7f-4c00-a559-e4f6a2246f08", "7a858aed-70b7-4c7a-bc4f-799216bb455b"] + "tests": ["c548c5b3-dada-4e5d-af7f-2767bf5e2b6d", "3d0feea6-0edc-4669-ab3c-54f2b5d4ebca", "340b4d62-de7f-4c00-a559-e4f6a2246f08", "7a858aed-70b7-4c7a-bc4f-799216bb455b", "4073d67e-c10e-4c4a-a994-b6c8e2520b19"] }], "urls": ["http://test.paheko.localhost/"], "plugins": []