From 207ba917e818fbca082a7c0606180bfcd03ba52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Wed, 23 Jul 2025 16:50:19 -0300 Subject: [PATCH 01/23] test: agregar tests automatizados con Selenium --- Ideal-tests.side | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 Ideal-tests.side diff --git a/Ideal-tests.side b/Ideal-tests.side new file mode 100644 index 0000000..5464337 --- /dev/null +++ b/Ideal-tests.side @@ -0,0 +1,226 @@ +{ + "id": "5e641802-369b-4bd7-b414-f2f63632d0bb", + "version": "2.0", + "name": "Ideal-tests", + "url": "http://localhost:4321/", + "tests": [{ + "id": "467d4bfd-5d44-4261-8d7a-62bc374db520", + "name": "scroll-innecesario-old", + "commands": [{ + "id": "526afa23-0213-4362-a2d7-4692b7f03287", + "comment": "", + "command": "open", + "target": "https://ideal.fiuni.edu.py/", + "targets": [], + "value": "" + }, { + "id": "8ac4b608-24b2-4ac1-8538-83b7459c179e", + "comment": "", + "command": "setWindowSize", + "target": "1512x945", + "targets": [], + "value": "" + }, { + "id": "6231d935-e431-4be0-a3ec-76895224de13", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [ + ["css=.flex:nth-child(3) > .flex > .font-semibold", "css:finder"], + ["xpath=//a[3]/span/span[2]", "xpath:position"] + ], + "value": "" + }, { + "id": "bbf5122c-73a2-44cf-b204-95aa401086f7", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(4) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(4) > .bg-blue-200", "css:finder"], + ["xpath=//div[4]/button", "xpath:position"], + ["xpath=//button[contains(.,'4')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "1345c8fb-997b-46ea-873b-b2f8dc8d7520", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(1) .font-medium", + "targets": [ + ["css=ul:nth-child(1) .font-medium", "css:finder"], + ["xpath=//span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Probabilidades y Estadística')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "ac3fbabc-066a-4a57-82b5-07f837016598", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(1) > .text-base", + "targets": [ + ["css=.flex:nth-child(1) > .text-base", "css:finder"], + ["xpath=//ul/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Analisis de Grandes conjuntos de Datos')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "212d9bb4-be39-4455-a6d0-ed30f4b28376", + "comment": "", + "command": "click", + "target": "css=html", + "targets": [ + ["css=html", "css:finder"], + ["xpath=//html", "xpath:position"] + ], + "value": "" + }, { + "id": "ff234ca5-3f8b-4225-abab-b83748ae86d8", + "comment": "", + "command": "executeScript", + "target": "return document.documentElement.scrollHeight - document.body.scrollHeight; Value: htmlBodyDiff", + "targets": [], + "value": "htmlBodyDiff" + }, { + "id": "6488a3da-ddd5-49c7-8bbc-9456a90d6997", + "comment": "", + "command": "assert", + "target": "htmlBodyDiff", + "targets": [], + "value": "0" + }] + }, { + "id": "f930c65f-f70a-4668-8149-c0a3b3f42fc4", + "name": "buscador-repaso", + "commands": [{ + "id": "d121a9c4-1c10-46af-8e8d-5f1674ccf28f", + "comment": "", + "command": "open", + "target": "https://ideal.fiuni.edu.py/", + "targets": [], + "value": "" + }, { + "id": "fd73fd63-a3ef-41a3-91e4-40c5432d7f78", + "comment": "", + "command": "setWindowSize", + "target": "1512x945", + "targets": [], + "value": "" + }, { + "id": "57d8a2b9-ea8c-4827-afb5-e4d8096f60aa", + "comment": "", + "command": "click", + "target": "id=search-bar", + "targets": [ + ["id=search-bar", "id"], + ["css=#search-bar", "css:finder"], + ["xpath=//div[@id='search-bar']", "xpath:attributes"], + ["xpath=//div[2]", "xpath:position"] + ], + "value": "" + }, { + "id": "7c5a35fe-494d-4453-af3b-aaff1ed37cd1", + "comment": "", + "command": "type", + "target": "css=.pagefind-ui__search-input", + "targets": [ + ["css=.pagefind-ui__search-input", "css:finder"], + ["xpath=//input[@type='text']", "xpath:attributes"], + ["xpath=//div[@id='search']/div/form/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "repaso" + }, { + "id": "5fc6dc21-43d7-4af2-b8c1-edd73acc5de6", + "comment": "", + "command": "click", + "target": "linkText=Repaso Final", + "targets": [ + ["linkText=Repaso Final", "linkText"], + ["css=.pagefind-ui__result:nth-child(1) .pagefind-ui__result-link", "css:finder"], + ["xpath=//a[contains(text(),'Repaso Final')]", "xpath:link"], + ["xpath=//div[@id='search']/div/form/div/div/ol/li/div/p/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/posts/repaso-final-1/')]", "xpath:href"], + ["xpath=//p/a", "xpath:position"], + ["xpath=//a[contains(.,'Repaso Final')]", "xpath:innerText"] + ], + "value": "" + }] + }, { + "id": "da296394-dc6e-4f2b-b3ba-0cb3256a8710", + "name": "scroll-innecesario-new", + "commands": [{ + "id": "87ec0025-fb7f-49dc-8868-fe8432136865", + "comment": "", + "command": "open", + "target": "http://localhost:4321/", + "targets": [], + "value": "" + }, { + "id": "87f9e2b2-05da-4a5d-b568-6010c05fca53", + "comment": "", + "command": "setWindowSize", + "target": "1512x945", + "targets": [], + "value": "" + }, { + "id": "e237fbd1-b855-4305-91e9-fc6274feec12", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [], + "value": "" + }, { + "id": "093de543-8a93-49e0-b0c7-5577e35b45a2", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(4) > .bg-blue-200", + "targets": [], + "value": "" + }, { + "id": "0182d876-cc84-42e2-b67d-ea4760fb9412", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(1) .font-medium", + "targets": [], + "value": "" + }, { + "id": "d42570e0-59af-418f-8392-6c03085f6d44", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(1) > .text-base", + "targets": [], + "value": "" + }, { + "id": "83e3ba6e-b1f3-4e42-8046-3fec343a5155", + "comment": "", + "command": "click", + "target": "css=html", + "targets": [], + "value": "" + }, { + "id": "e30fb155-6f61-4a04-beea-65e0502b0917", + "comment": "", + "command": "executeScript", + "target": "return document.documentElement.scrollHeight - document.body.scrollHeight; Value: htmlBodyDiff", + "targets": [], + "value": "htmlBodyDiff" + }, { + "id": "a1a1ef70-da66-4554-97fb-b64efd3bb922", + "comment": "", + "command": "assert", + "target": "htmlBodyDiff", + "targets": [], + "value": "0" + }] + }], + "suites": [{ + "id": "5273da1b-4afb-4808-88dc-eb8fc643f9c8", + "name": "Default Suite", + "persistSession": false, + "parallel": false, + "timeout": 300, + "tests": ["467d4bfd-5d44-4261-8d7a-62bc374db520"] + }], + "urls": ["https://ideal.fiuni.edu.py/", "http://localhost:4321/"], + "plugins": [] +} \ No newline at end of file From cf3e50830bc04eafb9127f22d98d4b8d1f5ee94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Wed, 23 Jul 2025 16:54:39 -0300 Subject: [PATCH 02/23] test:crear directorio testing --- Ideal-tests.side => tests/Ideal-tests.side | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Ideal-tests.side => tests/Ideal-tests.side (100%) diff --git a/Ideal-tests.side b/tests/Ideal-tests.side similarity index 100% rename from Ideal-tests.side rename to tests/Ideal-tests.side From f7e6ff656629f63866f6778c6117cc2ab4d6eadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 15:50:25 -0300 Subject: [PATCH 03/23] test: Agregar sub-directorios --- tests/dev-local/Ideal-tests-local.side | 708 +++++++++++++++++++++++++ tests/prod/ideal-tests-prod.side | 74 +++ 2 files changed, 782 insertions(+) create mode 100644 tests/dev-local/Ideal-tests-local.side create mode 100644 tests/prod/ideal-tests-prod.side diff --git a/tests/dev-local/Ideal-tests-local.side b/tests/dev-local/Ideal-tests-local.side new file mode 100644 index 0000000..0f3032f --- /dev/null +++ b/tests/dev-local/Ideal-tests-local.side @@ -0,0 +1,708 @@ +{ + "id": "5e641802-369b-4bd7-b414-f2f63632d0bb", + "version": "2.0", + "name": "Ideal-tests", + "url": "http://localhost:4321/", + "tests": [{ + "id": "da296394-dc6e-4f2b-b3ba-0cb3256a8710", + "name": "scroll-innecesario-new", + "commands": [{ + "id": "87ec0025-fb7f-49dc-8868-fe8432136865", + "comment": "", + "command": "open", + "target": "http://localhost:4321/", + "targets": [], + "value": "" + }, { + "id": "87f9e2b2-05da-4a5d-b568-6010c05fca53", + "comment": "", + "command": "setWindowSize", + "target": "1512x945", + "targets": [], + "value": "" + }, { + "id": "e237fbd1-b855-4305-91e9-fc6274feec12", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [], + "value": "" + }, { + "id": "093de543-8a93-49e0-b0c7-5577e35b45a2", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(4) > .bg-blue-200", + "targets": [], + "value": "" + }, { + "id": "0182d876-cc84-42e2-b67d-ea4760fb9412", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(1) .font-medium", + "targets": [], + "value": "" + }, { + "id": "d42570e0-59af-418f-8392-6c03085f6d44", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(1) > .text-base", + "targets": [], + "value": "" + }, { + "id": "83e3ba6e-b1f3-4e42-8046-3fec343a5155", + "comment": "", + "command": "click", + "target": "css=html", + "targets": [], + "value": "" + }, { + "id": "e30fb155-6f61-4a04-beea-65e0502b0917", + "comment": "", + "command": "executeScript", + "target": "return document.documentElement.scrollHeight - document.body.scrollHeight; Value: htmlBodyDiff", + "targets": [], + "value": "htmlBodyDiff" + }, { + "id": "a1a1ef70-da66-4554-97fb-b64efd3bb922", + "comment": "", + "command": "assert", + "target": "htmlBodyDiff", + "targets": [], + "value": "0" + }] + }, { + "id": "11d1c3a8-223a-41a7-b0ac-729d423c96fc", + "name": "back-button", + "commands": [{ + "id": "2f4b5cdb-7e80-4fbc-9d9e-ba2097c95fdf", + "comment": "", + "command": "open", + "target": "http://localhost:4321/", + "targets": [], + "value": "" + }, { + "id": "8ddbc0b2-5b3e-4f52-a43a-532640a38689", + "comment": "", + "command": "setWindowSize", + "target": "1290x879", + "targets": [], + "value": "" + }, { + "id": "f702340a-0fc4-4d90-bce2-811cdacd47aa", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [ + ["css=.flex:nth-child(3) > .flex > .font-semibold", "css:finder"], + ["xpath=//a[3]/span/span[2]", "xpath:position"] + ], + "value": "" + }, { + "id": "72567d90-f350-43e2-b057-8cb53ec9b4e8", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(4) .font-medium", + "targets": [ + ["css=ul:nth-child(4) .font-medium", "css:finder"], + ["xpath=//ul[4]/a/div/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Redes de Computadoras 1')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "9400318d-e6fa-4e16-bd39-eedc4fe97e90", + "comment": "", + "command": "click", + "target": "css=.flex-row:nth-child(1)", + "targets": [ + ["css=.flex-row:nth-child(1)", "css:finder"], + ["xpath=//a[contains(@href, '/posts/capa-de-red')]", "xpath:href"], + ["xpath=//ul/a", "xpath:position"] + ], + "value": "" + }, { + "id": "192f4787-8dd7-4f93-9035-1e3ff8fa37a4", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//section/header/div/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "e981bc98-4c8a-4796-b96c-55f92cba12d1", + "comment": "", + "command": "click", + "target": "css=.flex-shrink-0", + "targets": [ + ["css=.flex-shrink-0", "css:finder"] + ], + "value": "" + }, { + "id": "b6cf342b-e758-41ed-880c-1875a4b9f2bd", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "fe0ba539-d03f-42d9-a457-b265efb0a8c2", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [ + ["css=.flex:nth-child(3) > .flex > .font-semibold", "css:finder"], + ["xpath=//a[3]/span/span[2]", "xpath:position"] + ], + "value": "" + }, { + "id": "f34f2c47-ddfc-49f0-9e76-57c14e91d679", + "comment": "", + "command": "click", + "target": "linkText=Contabilidad", + "targets": [ + ["linkText=Contabilidad", "linkText"], + ["css=ul:nth-child(2) > .bg-gray-200", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor-Co')]", "xpath:href"], + ["xpath=//ul[2]/a", "xpath:position"], + ["xpath=//a[contains(.,'Contabilidad')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "8cb014df-75ee-4164-95a6-05989bfd3eb8", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(1) > .flex > .hidden > .mx-1", + "targets": [ + ["css=.flex:nth-child(1) > .flex > .hidden > .mx-1", "css:finder"], + ["xpath=//p", "xpath:position"], + ["xpath=//p[contains(.,'Josue Vera')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "98ba82b8-d02e-48e1-ad1c-71c16dce49c5", + "comment": "", + "command": "click", + "target": "linkText=Estados Financieros.", + "targets": [ + ["linkText=Estados Financieros.", "linkText"], + ["css=ul:nth-child(1) > li:nth-child(3) > .hover\\3Aunderline", "css:finder"], + ["xpath=(//a[contains(text(),'Estados Financieros.')])[2]", "xpath:link"], + ["xpath=//nav[@id='toc']/ul/li[3]/a", "xpath:idRelative"], + ["xpath=(//a[contains(@href, '#estados-financieros')])[2]", "xpath:href"], + ["xpath=//nav/ul/li[3]/a", "xpath:position"] + ], + "value": "" + }, { + "id": "c351c21c-09aa-419a-b5bc-ff0be3e0732d", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//section/header/div/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "8ca4634e-fb53-476e-8b97-28a48f126d06", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/div/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "863ddfb8-0df4-4714-845a-b8c46286d3a9", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }] + }, { + "id": "512669e2-8df4-4e87-986b-4302d0e3818a", + "name": "desbordamiento-tablas", + "commands": [{ + "id": "8f0656d9-03db-4db4-90bd-7fe8092509c8", + "comment": "", + "command": "open", + "target": "http://localhost:4321/", + "targets": [], + "value": "" + }, { + "id": "c4bedfde-0a90-4123-bd48-6f38e919dd17", + "comment": "", + "command": "setWindowSize", + "target": "1512x879", + "targets": [], + "value": "" + }, { + "id": "52bea66c-a75d-4f41-a9a4-9f8324b82a92", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [ + ["css=.flex:nth-child(3) > .flex > .font-semibold", "css:finder"], + ["xpath=//a[3]/span/span[2]", "xpath:position"] + ], + "value": "" + }, { + "id": "892b88cb-2de8-418a-9d9f-13fc3938fc90", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(4) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(4) > .bg-blue-200", "css:finder"], + ["xpath=//div[4]/button", "xpath:position"], + ["xpath=//button[contains(.,'4')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "4ad5c926-7796-446b-95e5-9d01271dc2b4", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(4) .font-medium", + "targets": [ + ["css=ul:nth-child(4) .font-medium", "css:finder"], + ["xpath=//ul[4]/a/div/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Redes de Computadoras 1')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "c7d3bda2-243f-4263-b53d-cc888e8e3641", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(9) > .text-base", + "targets": [ + ["css=.flex:nth-child(9) > .text-base", "css:finder"], + ["xpath=//a[9]/span", "xpath:position"], + ["xpath=//span[contains(.,'Resumen de Exposiciones de Redes Hasta Capa de Enlace')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "0d962116-0018-452e-8aa8-cc65c5b8c6ba", + "comment": "", + "command": "executeScript", + "target": "return document.documentElement.scrollWidth - window.innerWidth;", + "targets": [], + "value": "scrollXDiff" + }, { + "id": "7fd6851b-e208-4af6-8721-e730c646d910", + "comment": "", + "command": "assert", + "target": "scrollXDiff", + "targets": [], + "value": "0" + }] + }, { + "id": "b4e09c97-221d-48ad-abb0-35c74e3d2daa", + "name": "mantiene-filtro-semestre", + "commands": [{ + "id": "17ef9f0d-6ef1-44db-aec7-1019fd25ed0a", + "comment": "", + "command": "open", + "target": "http://localhost:4321/", + "targets": [], + "value": "" + }, { + "id": "8d080d6d-a159-4366-9d7a-5ea80386f43f", + "comment": "", + "command": "setWindowSize", + "target": "1512x945", + "targets": [], + "value": "" + }, { + "id": "6e786977-1d1c-4fa4-920c-cf2eaaf33095", + "comment": "", + "command": "click", + "target": "css=.flex:nth-child(3) > .flex > .font-semibold", + "targets": [ + ["css=.flex:nth-child(3) > .flex > .font-semibold", "css:finder"], + ["xpath=//a[3]/span/span[2]", "xpath:position"] + ], + "value": "" + }, { + "id": "9327ea2d-5406-44b9-aa63-b7691f69bb87", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(4) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(4) > .bg-blue-200", "css:finder"], + ["xpath=//div[4]/button", "xpath:position"], + ["xpath=//button[contains(.,'4')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "09a22361-b199-4e1b-9973-548b8dfaa75d", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(4) .font-medium", + "targets": [ + ["css=ul:nth-child(4) .font-medium", "css:finder"], + ["xpath=//ul[4]/a/div/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Redes de Computadoras 1')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "17f4e351-4d51-49a6-95b5-1457d0f97485", + "comment": "", + "command": "click", + "target": "css=.flex-row:nth-child(4)", + "targets": [ + ["css=.flex-row:nth-child(4)", "css:finder"], + ["xpath=//a[contains(@href, '/posts/modulacion-digital')]", "xpath:href"], + ["xpath=//a[4]", "xpath:position"] + ], + "value": "" + }, { + "id": "4b8293cd-1b95-4d50-81c3-4b81041458cb", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//section/header/div/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "92c25be1-fb87-4c75-91f5-c38472309f10", + "comment": "", + "command": "click", + "target": "linkText=Volver", + "targets": [ + ["linkText=Volver", "linkText"], + ["css=.inline-flex", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor')]", "xpath:href"], + ["xpath=//body/div/a", "xpath:position"], + ["xpath=//a[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "19dcf3d1-a463-42d5-a32e-89a33985746d", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(6) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(6) > .bg-blue-200", "css:finder"], + ["xpath=//div[6]/button", "xpath:position"], + ["xpath=//button[contains(.,'6')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "a895d2b2-fb8a-454b-b407-b3fa84b29cc6", + "comment": "", + "command": "click", + "target": "linkText=Sistema de Gestión", + "targets": [ + ["linkText=Sistema de Gestión", "linkText"], + ["css=ul:nth-child(1) > .bg-gray-200", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor-Sg')]", "xpath:href"], + ["xpath=//ul/a", "xpath:position"], + ["xpath=//a[contains(.,'Sistema de Gestión')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "b960745c-e6f3-4b49-9c25-2e35af285338", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/div/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "0eb506c6-0abd-4c28-afaf-1ade9e9d6850", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(3) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(3) > .bg-blue-200", "css:finder"], + ["xpath=//div[3]/button", "xpath:position"], + ["xpath=//button[contains(.,'3')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "7d0c94a5-a3b2-4c4c-8ffb-5f62684c293e", + "comment": "", + "command": "click", + "target": "linkText=Análisis 3", + "targets": [ + ["linkText=Análisis 3", "linkText"], + ["css=ul:nth-child(1) > .bg-gray-200", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor-A3')]", "xpath:href"], + ["xpath=//ul/a", "xpath:position"], + ["xpath=//a[contains(.,'Análisis 3')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "3ef3cbc9-c466-4a23-8851-d1d0d44440db", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/div/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "f68495a6-ab34-4049-8ee8-77c33fe308cb", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(1) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(1) > .bg-blue-200", "css:finder"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'1')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "e3f93585-f220-4357-b2d5-9cd394ba43f4", + "comment": "", + "command": "click", + "target": "linkText=Fisica 1", + "targets": [ + ["linkText=Fisica 1", "linkText"], + ["css=ul:nth-child(1) > .bg-gray-200", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor-F1')]", "xpath:href"], + ["xpath=//ul/a", "xpath:position"], + ["xpath=//a[contains(.,'Fisica 1')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "32e0c554-7255-4ebc-9aa1-72dc9ca28020", + "comment": "", + "command": "click", + "target": "linkText=Volver", + "targets": [ + ["linkText=Volver", "linkText"], + ["css=.inline-flex", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor')]", "xpath:href"], + ["xpath=//body/div/a", "xpath:position"], + ["xpath=//a[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "585b967f-cb67-4604-b626-1ab843e8ab8b", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "00111077-61f2-4437-96b0-ca4d6125669b", + "comment": "", + "command": "click", + "target": "linkText=Ingeniería Electromecánica", + "targets": [ + ["linkText=Ingeniería Electromecánica", "linkText"], + ["css=.justify-between:nth-child(2)", "css:finder"], + ["xpath=//a[contains(@href, '/posts/electro')]", "xpath:href"], + ["xpath=//section/div/a[2]", "xpath:position"], + ["xpath=//a[contains(.,'Ingeniería Electromecánica')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "e073f081-d044-4409-8aa8-0437c80d150d", + "comment": "", + "command": "click", + "target": "css=.bg-blue-700", + "targets": [ + ["css=.bg-blue-700", "css:finder"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'5')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "d4d32b87-0a10-42a9-8c1b-b1f08b2da607", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(4) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(4) > .bg-blue-200", "css:finder"], + ["xpath=//div[4]/button", "xpath:position"], + ["xpath=//button[contains(.,'8')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "571d07f9-9305-4f29-874c-c2a29df4b457", + "comment": "", + "command": "click", + "target": "css=ul:nth-child(1) .font-medium", + "targets": [ + ["css=ul:nth-child(1) .font-medium", "css:finder"], + ["xpath=//span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Metalurgia General')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "7875d7f8-0f10-46b7-8bc0-fc6432dc19c4", + "comment": "", + "command": "click", + "target": "linkText=Volver", + "targets": [ + ["linkText=Volver", "linkText"], + ["css=.inline-flex", "css:finder"], + ["xpath=//a[contains(@href, '/posts/electro')]", "xpath:href"], + ["xpath=//body/div/a", "xpath:position"], + ["xpath=//a[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "c4662832-1581-49ba-8051-4a4db804cac5", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(2) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(2) > .bg-blue-200", "css:finder"], + ["xpath=//div[2]/button", "xpath:position"], + ["xpath=//button[contains(.,'6')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "de5fa19b-041f-417e-918e-69b540d71903", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(1) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(1) > .bg-blue-200", "css:finder"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'5')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "58ae6a4d-3e1f-4bef-ad1e-ee0ecb93df9f", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "3c18c3d5-aac0-4752-a0b2-a88422f24694", + "comment": "", + "command": "click", + "target": "linkText=Ingeniería Informática", + "targets": [ + ["linkText=Ingeniería Informática", "linkText"], + ["css=.justify-between:nth-child(3)", "css:finder"], + ["xpath=//a[contains(@href, '/posts/infor')]", "xpath:href"], + ["xpath=//a[3]", "xpath:position"], + ["xpath=//a[contains(.,'Ingeniería Informática')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "6c9fc710-9b6b-4e1d-8365-a1bbe0d1318d", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(3) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(3) > .bg-blue-200", "css:finder"], + ["xpath=//div[3]/button", "xpath:position"], + ["xpath=//button[contains(.,'3')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "12b3f9b2-0ee9-43f4-9a61-2b6e64fdd349", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(1) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(1) > .bg-blue-200", "css:finder"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'1')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "afa0b9d2-9690-4067-b09e-bb17ca2fd28d", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "48908d1b-ed4e-42ee-9a3b-9565c678ea78", + "comment": "", + "command": "click", + "target": "linkText=Ingeniería Civil", + "targets": [ + ["linkText=Ingeniería Civil", "linkText"], + ["css=.bg-gray-100:nth-child(1)", "css:finder"], + ["xpath=//a[contains(@href, '/posts/civil')]", "xpath:href"], + ["xpath=//section/div/a", "xpath:position"], + ["xpath=//a[contains(.,'Ingeniería Civil')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "d8baba85-6b99-4b47-85bb-8096e346b2fc", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(2) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(2) > .bg-blue-200", "css:finder"], + ["xpath=//div[2]/button", "xpath:position"], + ["xpath=//button[contains(.,'6')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "cbe44abf-4e9b-4e5c-90d4-385b40139c0f", + "comment": "", + "command": "click", + "target": "css=.mr-1:nth-child(1) > .bg-blue-200", + "targets": [ + ["css=.mr-1:nth-child(1) > .bg-blue-200", "css:finder"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'5')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "2a386c64-30ac-4823-906b-58dbac07dd56", + "comment": "", + "command": "click", + "target": "css=.inline-flex > span", + "targets": [ + ["css=.inline-flex > span", "css:finder"], + ["xpath=//body/a/span", "xpath:position"], + ["xpath=//span[contains(.,'Volver')]", "xpath:innerText"] + ], + "value": "" + }] + }], + "suites": [{ + "id": "5273da1b-4afb-4808-88dc-eb8fc643f9c8", + "name": "Default Suite", + "persistSession": false, + "parallel": false, + "timeout": 300, + "tests": [] + }], + "urls": ["https://ideal.fiuni.edu.py/", "http://localhost:4321/"], + "plugins": [] +} \ No newline at end of file diff --git a/tests/prod/ideal-tests-prod.side b/tests/prod/ideal-tests-prod.side new file mode 100644 index 0000000..747615f --- /dev/null +++ b/tests/prod/ideal-tests-prod.side @@ -0,0 +1,74 @@ +{ + "id": "74385177-01b2-455a-9e25-293f48894cfa", + "version": "2.0", + "name": "ideal-tests-prod", + "url": "https://ideal.fiuni.edu.py/", + "tests": [{ + "id": "d5c8ab56-2caf-4175-88e7-8534a956c48a", + "name": "barra-de-busqueda", + "commands": [{ + "id": "ad7f6f9c-75b0-4828-8ffd-2528057cce59", + "comment": "", + "command": "open", + "target": "https://ideal.fiuni.edu.py/", + "targets": [], + "value": "" + }, { + "id": "9e9c5361-6dc6-4989-9ed6-d07714baf2db", + "comment": "", + "command": "setWindowSize", + "target": "1512x945", + "targets": [], + "value": "" + }, { + "id": "c2144cd3-92e5-43fe-a22f-1702efd4552c", + "comment": "", + "command": "click", + "target": "css=#search-bar > .text-sm", + "targets": [ + ["css=#search-bar > .text-sm", "css:finder"], + ["xpath=//div[@id='search-bar']/span", "xpath:idRelative"], + ["xpath=//span", "xpath:position"], + ["xpath=//span[contains(.,'Buscar recursos...')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "cb71df14-9f1b-49b6-90d4-ee1edebf6a70", + "comment": "", + "command": "type", + "target": "css=.pagefind-ui__search-input", + "targets": [ + ["css=.pagefind-ui__search-input", "css:finder"], + ["xpath=//input[@type='text']", "xpath:attributes"], + ["xpath=//div[@id='search']/div/form/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "repaso" + }, { + "id": "e0f1ca52-3189-43d2-bc30-a9175936f3af", + "comment": "", + "command": "click", + "target": "linkText=Repaso Final", + "targets": [ + ["linkText=Repaso Final", "linkText"], + ["css=.pagefind-ui__result:nth-child(1) .pagefind-ui__result-link", "css:finder"], + ["xpath=//a[contains(text(),'Repaso Final')]", "xpath:link"], + ["xpath=//div[@id='search']/div/form/div/div/ol/li/div/p/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/posts/repaso-final-1/')]", "xpath:href"], + ["xpath=//p/a", "xpath:position"], + ["xpath=//a[contains(.,'Repaso Final')]", "xpath:innerText"] + ], + "value": "" + }] + }], + "suites": [{ + "id": "70174d24-09ba-4cc2-bde9-86b5f6046598", + "name": "Default Suite", + "persistSession": false, + "parallel": false, + "timeout": 300, + "tests": ["d5c8ab56-2caf-4175-88e7-8534a956c48a"] + }], + "urls": ["https://ideal.fiuni.edu.py/"], + "plugins": [] +} \ No newline at end of file From ac4197609ff3b887638fea271b7085371820e42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 15:52:28 -0300 Subject: [PATCH 04/23] test: eliminar tests-old --- tests/Ideal-tests.side | 226 ----------------------------------------- 1 file changed, 226 deletions(-) delete mode 100644 tests/Ideal-tests.side diff --git a/tests/Ideal-tests.side b/tests/Ideal-tests.side deleted file mode 100644 index 5464337..0000000 --- a/tests/Ideal-tests.side +++ /dev/null @@ -1,226 +0,0 @@ -{ - "id": "5e641802-369b-4bd7-b414-f2f63632d0bb", - "version": "2.0", - "name": "Ideal-tests", - "url": "http://localhost:4321/", - "tests": [{ - "id": "467d4bfd-5d44-4261-8d7a-62bc374db520", - "name": "scroll-innecesario-old", - "commands": [{ - "id": "526afa23-0213-4362-a2d7-4692b7f03287", - "comment": "", - "command": "open", - "target": "https://ideal.fiuni.edu.py/", - "targets": [], - "value": "" - }, { - "id": "8ac4b608-24b2-4ac1-8538-83b7459c179e", - "comment": "", - "command": "setWindowSize", - "target": "1512x945", - "targets": [], - "value": "" - }, { - "id": "6231d935-e431-4be0-a3ec-76895224de13", - "comment": "", - "command": "click", - "target": "css=.flex:nth-child(3) > .flex > .font-semibold", - "targets": [ - ["css=.flex:nth-child(3) > .flex > .font-semibold", "css:finder"], - ["xpath=//a[3]/span/span[2]", "xpath:position"] - ], - "value": "" - }, { - "id": "bbf5122c-73a2-44cf-b204-95aa401086f7", - "comment": "", - "command": "click", - "target": "css=.mr-1:nth-child(4) > .bg-blue-200", - "targets": [ - ["css=.mr-1:nth-child(4) > .bg-blue-200", "css:finder"], - ["xpath=//div[4]/button", "xpath:position"], - ["xpath=//button[contains(.,'4')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "1345c8fb-997b-46ea-873b-b2f8dc8d7520", - "comment": "", - "command": "click", - "target": "css=ul:nth-child(1) .font-medium", - "targets": [ - ["css=ul:nth-child(1) .font-medium", "css:finder"], - ["xpath=//span[2]", "xpath:position"], - ["xpath=//span[contains(.,'Probabilidades y Estadística')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "ac3fbabc-066a-4a57-82b5-07f837016598", - "comment": "", - "command": "click", - "target": "css=.flex:nth-child(1) > .text-base", - "targets": [ - ["css=.flex:nth-child(1) > .text-base", "css:finder"], - ["xpath=//ul/a/span", "xpath:position"], - ["xpath=//span[contains(.,'Analisis de Grandes conjuntos de Datos')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "212d9bb4-be39-4455-a6d0-ed30f4b28376", - "comment": "", - "command": "click", - "target": "css=html", - "targets": [ - ["css=html", "css:finder"], - ["xpath=//html", "xpath:position"] - ], - "value": "" - }, { - "id": "ff234ca5-3f8b-4225-abab-b83748ae86d8", - "comment": "", - "command": "executeScript", - "target": "return document.documentElement.scrollHeight - document.body.scrollHeight; Value: htmlBodyDiff", - "targets": [], - "value": "htmlBodyDiff" - }, { - "id": "6488a3da-ddd5-49c7-8bbc-9456a90d6997", - "comment": "", - "command": "assert", - "target": "htmlBodyDiff", - "targets": [], - "value": "0" - }] - }, { - "id": "f930c65f-f70a-4668-8149-c0a3b3f42fc4", - "name": "buscador-repaso", - "commands": [{ - "id": "d121a9c4-1c10-46af-8e8d-5f1674ccf28f", - "comment": "", - "command": "open", - "target": "https://ideal.fiuni.edu.py/", - "targets": [], - "value": "" - }, { - "id": "fd73fd63-a3ef-41a3-91e4-40c5432d7f78", - "comment": "", - "command": "setWindowSize", - "target": "1512x945", - "targets": [], - "value": "" - }, { - "id": "57d8a2b9-ea8c-4827-afb5-e4d8096f60aa", - "comment": "", - "command": "click", - "target": "id=search-bar", - "targets": [ - ["id=search-bar", "id"], - ["css=#search-bar", "css:finder"], - ["xpath=//div[@id='search-bar']", "xpath:attributes"], - ["xpath=//div[2]", "xpath:position"] - ], - "value": "" - }, { - "id": "7c5a35fe-494d-4453-af3b-aaff1ed37cd1", - "comment": "", - "command": "type", - "target": "css=.pagefind-ui__search-input", - "targets": [ - ["css=.pagefind-ui__search-input", "css:finder"], - ["xpath=//input[@type='text']", "xpath:attributes"], - ["xpath=//div[@id='search']/div/form/input", "xpath:idRelative"], - ["xpath=//input", "xpath:position"] - ], - "value": "repaso" - }, { - "id": "5fc6dc21-43d7-4af2-b8c1-edd73acc5de6", - "comment": "", - "command": "click", - "target": "linkText=Repaso Final", - "targets": [ - ["linkText=Repaso Final", "linkText"], - ["css=.pagefind-ui__result:nth-child(1) .pagefind-ui__result-link", "css:finder"], - ["xpath=//a[contains(text(),'Repaso Final')]", "xpath:link"], - ["xpath=//div[@id='search']/div/form/div/div/ol/li/div/p/a", "xpath:idRelative"], - ["xpath=//a[contains(@href, '/posts/repaso-final-1/')]", "xpath:href"], - ["xpath=//p/a", "xpath:position"], - ["xpath=//a[contains(.,'Repaso Final')]", "xpath:innerText"] - ], - "value": "" - }] - }, { - "id": "da296394-dc6e-4f2b-b3ba-0cb3256a8710", - "name": "scroll-innecesario-new", - "commands": [{ - "id": "87ec0025-fb7f-49dc-8868-fe8432136865", - "comment": "", - "command": "open", - "target": "http://localhost:4321/", - "targets": [], - "value": "" - }, { - "id": "87f9e2b2-05da-4a5d-b568-6010c05fca53", - "comment": "", - "command": "setWindowSize", - "target": "1512x945", - "targets": [], - "value": "" - }, { - "id": "e237fbd1-b855-4305-91e9-fc6274feec12", - "comment": "", - "command": "click", - "target": "css=.flex:nth-child(3) > .flex > .font-semibold", - "targets": [], - "value": "" - }, { - "id": "093de543-8a93-49e0-b0c7-5577e35b45a2", - "comment": "", - "command": "click", - "target": "css=.mr-1:nth-child(4) > .bg-blue-200", - "targets": [], - "value": "" - }, { - "id": "0182d876-cc84-42e2-b67d-ea4760fb9412", - "comment": "", - "command": "click", - "target": "css=ul:nth-child(1) .font-medium", - "targets": [], - "value": "" - }, { - "id": "d42570e0-59af-418f-8392-6c03085f6d44", - "comment": "", - "command": "click", - "target": "css=.flex:nth-child(1) > .text-base", - "targets": [], - "value": "" - }, { - "id": "83e3ba6e-b1f3-4e42-8046-3fec343a5155", - "comment": "", - "command": "click", - "target": "css=html", - "targets": [], - "value": "" - }, { - "id": "e30fb155-6f61-4a04-beea-65e0502b0917", - "comment": "", - "command": "executeScript", - "target": "return document.documentElement.scrollHeight - document.body.scrollHeight; Value: htmlBodyDiff", - "targets": [], - "value": "htmlBodyDiff" - }, { - "id": "a1a1ef70-da66-4554-97fb-b64efd3bb922", - "comment": "", - "command": "assert", - "target": "htmlBodyDiff", - "targets": [], - "value": "0" - }] - }], - "suites": [{ - "id": "5273da1b-4afb-4808-88dc-eb8fc643f9c8", - "name": "Default Suite", - "persistSession": false, - "parallel": false, - "timeout": 300, - "tests": ["467d4bfd-5d44-4261-8d7a-62bc374db520"] - }], - "urls": ["https://ideal.fiuni.edu.py/", "http://localhost:4321/"], - "plugins": [] -} \ No newline at end of file From 913c42ab1844d8689165563776dbdb13db284e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 16:14:12 -0300 Subject: [PATCH 05/23] test: agregar github actions --- .github/workflows/selenium.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/selenium.yml diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml new file mode 100644 index 0000000..a11cc74 --- /dev/null +++ b/.github/workflows/selenium.yml @@ -0,0 +1,40 @@ +name: Run Selenium IDE tests + +on: + pull_request: + branches: + - cardinal-quarter + +jobs: + selenium-tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Chrome + run: | + sudo apt-get update + sudo apt-get install -y wget gnupg unzip + wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list + sudo apt-get update + sudo apt-get install -y google-chrome-stable + + - name: Install Selenium Side Runner + run: | + npm install -g selenium-side-runner + + - name: Run Selenium Tests (dev-local & prod) + run: | + selenium-side-runner \ + --capabilities browserName=chrome,goog:chromeOptions.args='["--headless","--disable-gpu","--no-sandbox"]' \ + tests/dev-local/Ideal-tests-local.side \ + tests/prod/ideal-tests-prod.side + From 9d9520e000b4aa691a23c776de31ed8615c87bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 16:39:18 -0300 Subject: [PATCH 06/23] test: tests con firefox --- .github/workflows/selenium.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index a11cc74..89b8278 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -1,4 +1,4 @@ -name: Run Selenium IDE tests +name: Run Selenium IDE tests on Firefox on: pull_request: @@ -18,23 +18,11 @@ jobs: with: node-version: 18 - - name: Install Chrome - run: | - sudo apt-get update - sudo apt-get install -y wget gnupg unzip - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list - sudo apt-get update - sudo apt-get install -y google-chrome-stable - - name: Install Selenium Side Runner - run: | - npm install -g selenium-side-runner + run: npm install -g selenium-side-runner - - name: Run Selenium Tests (dev-local & prod) + - name: Run Selenium Tests (dev-local & prod) on Firefox run: | - selenium-side-runner \ - --capabilities browserName=chrome,goog:chromeOptions.args='["--headless","--disable-gpu","--no-sandbox"]' \ + selenium-side-runner --browser firefox \ tests/dev-local/Ideal-tests-local.side \ tests/prod/ideal-tests-prod.side - From da4289534cc79ad3b788170104d903f6700525d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 16:46:14 -0300 Subject: [PATCH 07/23] test: tests con firefox --- .github/workflows/selenium.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 89b8278..2f36f73 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -13,16 +13,20 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Node.js + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 18 - - name: Install Selenium Side Runner + - name: Install selenium-side-runner run: npm install -g selenium-side-runner - - name: Run Selenium Tests (dev-local & prod) on Firefox + - name: Check selenium-side-runner version + run: selenium-side-runner --version + + - name: Run Selenium Tests on Firefox run: | - selenium-side-runner --browser firefox \ + selenium-side-runner \ + -c browserName=firefox,moz:firefoxOptions.args=["-headless"] \ tests/dev-local/Ideal-tests-local.side \ tests/prod/ideal-tests-prod.side From 1f68c390cca892847844313bc04851af89bfab44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 16:49:01 -0300 Subject: [PATCH 08/23] test: tests con firefox --- .github/workflows/selenium.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 2f36f73..a4721c0 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -21,12 +21,9 @@ jobs: - name: Install selenium-side-runner run: npm install -g selenium-side-runner - - name: Check selenium-side-runner version - run: selenium-side-runner --version - - name: Run Selenium Tests on Firefox run: | selenium-side-runner \ - -c browserName=firefox,moz:firefoxOptions.args=["-headless"] \ + -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["-headless"]}}' \ tests/dev-local/Ideal-tests-local.side \ tests/prod/ideal-tests-prod.side From 6185e1d83c06ba7261224a58d3e77044b60339c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 16:53:02 -0300 Subject: [PATCH 09/23] test: tests con chrome --- .github/workflows/selenium.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index a4721c0..51dcd84 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -1,4 +1,4 @@ -name: Run Selenium IDE tests on Firefox +name: Run Selenium IDE tests on Chrome on: pull_request: @@ -18,12 +18,24 @@ jobs: with: node-version: 18 + - name: Install Google Chrome + run: | + sudo apt-get update + sudo apt-get install -y wget gnupg unzip + wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list + sudo apt-get update + sudo apt-get install -y google-chrome-stable + - name: Install selenium-side-runner run: npm install -g selenium-side-runner - - name: Run Selenium Tests on Firefox + - name: Clean temp folder + run: rm -rf /tmp/* + + - name: Run Selenium Tests on Chrome with clean profile run: | selenium-side-runner \ - -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["-headless"]}}' \ + -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile"]}}' \ tests/dev-local/Ideal-tests-local.side \ tests/prod/ideal-tests-prod.side From 4a8535be5851043f3c6cab8acd62bff0e890fdea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 16:55:13 -0300 Subject: [PATCH 10/23] test: tests con chrome --- .github/workflows/selenium.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 51dcd84..774bdbb 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -30,9 +30,6 @@ jobs: - name: Install selenium-side-runner run: npm install -g selenium-side-runner - - name: Clean temp folder - run: rm -rf /tmp/* - - name: Run Selenium Tests on Chrome with clean profile run: | selenium-side-runner \ From 9b183b52367181c5595dfd28f5c90fff840dbe76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 17:04:17 -0300 Subject: [PATCH 11/23] test: tests con chrome --- .github/workflows/selenium.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 774bdbb..beadb80 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -30,9 +30,14 @@ jobs: - name: Install selenium-side-runner run: npm install -g selenium-side-runner + - name: Clean up old Selenium profile directory + run: | + rm -rf /tmp/selenium_profile + # Añadimos esta línea para asegurar que el directorio esté limpio antes de la ejecución + - name: Run Selenium Tests on Chrome with clean profile run: | selenium-side-runner \ -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile"]}}' \ tests/dev-local/Ideal-tests-local.side \ - tests/prod/ideal-tests-prod.side + tests/prod/ideal-tests-prod.side \ No newline at end of file From 4973154ab82d8122611c4a2e4df1588ebeb4eb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 17:07:51 -0300 Subject: [PATCH 12/23] test: tests con chrome --- .github/workflows/selenium.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index beadb80..08214c3 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -30,14 +30,22 @@ jobs: - name: Install selenium-side-runner run: npm install -g selenium-side-runner - - name: Clean up old Selenium profile directory + # --- Primer set de tests --- + - name: Clean up old Selenium profile directory for dev-local tests + run: rm -rf /tmp/selenium_profile_dev_local # Directorio único para este set + + - name: Run Selenium Tests for Ideal-tests-local.side run: | - rm -rf /tmp/selenium_profile - # Añadimos esta línea para asegurar que el directorio esté limpio antes de la ejecución + selenium-side-runner \ + -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_dev_local"]}}' \ + tests/dev-local/Ideal-tests-local.side + + # --- Segundo set de tests --- + - name: Clean up old Selenium profile directory for prod tests + run: rm -rf /tmp/selenium_profile_prod # Directorio único para este set - - name: Run Selenium Tests on Chrome with clean profile + - name: Run Selenium Tests for ideal-tests-prod.side run: | selenium-side-runner \ - -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile"]}}' \ - tests/dev-local/Ideal-tests-local.side \ + -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_prod"]}}' \ tests/prod/ideal-tests-prod.side \ No newline at end of file From ccff5d122b2321c6cb83d1a29a8f190e34e67779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 17:14:31 -0300 Subject: [PATCH 13/23] test: tests con chrome --- .github/workflows/selenium.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 08214c3..73c2231 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -31,8 +31,11 @@ jobs: run: npm install -g selenium-side-runner # --- Primer set de tests --- - - name: Clean up old Selenium profile directory for dev-local tests - run: rm -rf /tmp/selenium_profile_dev_local # Directorio único para este set + - name: Ensure Chrome/ChromeDriver are stopped and clean profile for dev-local tests + run: | + sudo pkill -9 chrome || true # Mata cualquier proceso de Chrome de forma agresiva + sudo pkill -9 chromedriver || true # Mata cualquier proceso de ChromeDriver de forma agresiva + rm -rf /tmp/selenium_profile_dev_local # Elimina el directorio de perfil - name: Run Selenium Tests for Ideal-tests-local.side run: | @@ -41,8 +44,11 @@ jobs: tests/dev-local/Ideal-tests-local.side # --- Segundo set de tests --- - - name: Clean up old Selenium profile directory for prod tests - run: rm -rf /tmp/selenium_profile_prod # Directorio único para este set + - name: Ensure Chrome/ChromeDriver are stopped and clean profile for prod tests + run: | + sudo pkill -9 chrome || true + sudo pkill -9 chromedriver || true + rm -rf /tmp/selenium_profile_prod - name: Run Selenium Tests for ideal-tests-prod.side run: | From 8e0f506bc8830699a320d6f1a4f1dfcf83ea6bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 17:19:54 -0300 Subject: [PATCH 14/23] test: tests con chrome --- .github/workflows/selenium.yml | 78 +++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 21 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 73c2231..03421b0 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -3,55 +3,91 @@ name: Run Selenium IDE tests on Chrome on: pull_request: branches: - - cardinal-quarter + - cardinal-quarter # Este workflow se ejecutará cuando haya un Pull Request a la rama 'cardinal-quarter'. jobs: selenium-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Elige el sistema operativo para ejecutar tus tests. Ubuntu es común y eficiente. steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository code + uses: actions/checkout@v4 # Paso para obtener tu código del repositorio. Es el primer paso en casi todos los workflows. - - name: Setup Node.js - uses: actions/setup-node@v4 + - name: Setup Node.js environment + uses: actions/setup-node@v4 # Configura el entorno de Node.js, necesario para 'selenium-side-runner'. with: - node-version: 18 + node-version: 18 # Se recomienda usar una versión LTS (Long Term Support) de Node.js. - - name: Install Google Chrome + - name: Install Google Chrome Stable run: | - sudo apt-get update - sudo apt-get install -y wget gnupg unzip + echo "Updating apt package lists..." + sudo apt-get update # Actualiza la lista de paquetes disponibles. + + echo "Installing necessary dependencies for Chrome..." + sudo apt-get install -y wget gnupg unzip # Instala herramientas básicas necesarias para la instalación de Chrome. + + echo "Adding Google Chrome GPG key..." + # Añade la clave GPG de Google para verificar la autenticidad del paquete de Chrome. + # Aunque 'apt-key' está deprecado, sigue siendo funcional en muchos entornos de CI. wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + + echo "Adding Google Chrome repository to sources list..." + # Añade el repositorio de Google Chrome a la lista de fuentes de paquetes. echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list - sudo apt-get update - sudo apt-get install -y google-chrome-stable + + echo "Updating apt package lists again to include Chrome repository..." + sudo apt-get update # Vuelve a actualizar la lista de paquetes para que incluya Chrome. + + echo "Installing google-chrome-stable..." + sudo apt-get install -y google-chrome-stable # Instala la versión estable de Google Chrome. - name: Install selenium-side-runner - run: npm install -g selenium-side-runner + run: npm install -g selenium-side-runner # Instala el paquete 'selenium-side-runner' globalmente. - # --- Primer set de tests --- - - name: Ensure Chrome/ChromeDriver are stopped and clean profile for dev-local tests + + # --- Primer Grupo de Tests: Ideal-tests-local --- + - name: Prepare environment for Ideal-tests-local run: | - sudo pkill -9 chrome || true # Mata cualquier proceso de Chrome de forma agresiva - sudo pkill -9 chromedriver || true # Mata cualquier proceso de ChromeDriver de forma agresiva - rm -rf /tmp/selenium_profile_dev_local # Elimina el directorio de perfil + echo "Ensuring all Chrome/ChromeDriver processes are stopped for Ideal-tests-local..." + # Mata de forma agresiva cualquier proceso de Chrome o ChromeDriver que pueda estar ejecutándose. + # '|| true' asegura que el paso no falle si no hay procesos que matar. + sudo pkill -9 chrome || true + sudo pkill -9 chromedriver || true + + echo "Cleaning up user data directory: /tmp/selenium_profile_local" + # Elimina el directorio de perfil de usuario para asegurar un inicio limpio y evitar conflictos. + # Usamos un nombre de directorio único para este conjunto de tests. + rm -rf /tmp/selenium_profile_local - name: Run Selenium Tests for Ideal-tests-local.side run: | + echo "Executing Ideal-tests-local.side..." + # Ejecuta los tests de Selenium IDE para el archivo 'Ideal-tests-local.side'. + # -c para opciones de Chrome: + # "browserName": "chrome" - Especifica el navegador. + # "goog:chromeOptions": {"args": [...]} - Opciones específicas para Chrome. + # "--headless": Ejecuta Chrome sin interfaz gráfica, esencial para CI. + # "--disable-gpu": Deshabilita el uso de la GPU (recomendado en entornos virtuales). + # "--no-sandbox": Necesario en algunos entornos de CI para evitar problemas de permisos. + # "--user-data-dir=/tmp/selenium_profile_local": Usa un directorio de datos de usuario específico y único. selenium-side-runner \ - -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_dev_local"]}}' \ + -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_local"]}}' \ tests/dev-local/Ideal-tests-local.side - # --- Segundo set de tests --- - - name: Ensure Chrome/ChromeDriver are stopped and clean profile for prod tests + # --- Segundo Grupo de Tests: ideal-tests-prod --- + - name: Prepare environment for ideal-tests-prod run: | + echo "Ensuring all Chrome/ChromeDriver processes are stopped for ideal-tests-prod..." sudo pkill -9 chrome || true sudo pkill -9 chromedriver || true + + echo "Cleaning up user data directory: /tmp/selenium_profile_prod" + # Usamos un directorio de perfil diferente para este segundo conjunto de tests. rm -rf /tmp/selenium_profile_prod - name: Run Selenium Tests for ideal-tests-prod.side run: | + echo "Executing ideal-tests-prod.side..." selenium-side-runner \ -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_prod"]}}' \ tests/prod/ideal-tests-prod.side \ No newline at end of file From 5d838d7dfba80510e8caf8a29cbc9d6940b5d415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 17:34:41 -0300 Subject: [PATCH 15/23] test: tests con chrome y docker --- .github/workflows/selenium.yml | 121 ++++++++++++++++----------------- 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 03421b0..f7e534e 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -1,93 +1,90 @@ -name: Run Selenium IDE tests on Chrome +name: Run Selenium IDE tests with Dockerized Astro App on: pull_request: branches: - - cardinal-quarter # Este workflow se ejecutará cuando haya un Pull Request a la rama 'cardinal-quarter'. + - cardinal-quarter # Este workflow se activa cuando hay un PR hacia 'cardinal-quarter'. jobs: selenium-tests: - runs-on: ubuntu-latest # Elige el sistema operativo para ejecutar tus tests. Ubuntu es común y eficiente. + runs-on: ubuntu-latest # El entorno en el que se ejecutarán los tests. steps: - name: Checkout repository code - uses: actions/checkout@v4 # Paso para obtener tu código del repositorio. Es el primer paso en casi todos los workflows. + uses: actions/checkout@v4 # Obtiene el código de tu repositorio. En un PR, esto suele ser una combinación del HEAD de la rama base y los cambios de la rama del PR. Crucialmente, tendrá acceso al Dockerfile de la rama 'cardinal-quarter'. + # --- Docker Configuration for Astro App --- + - name: Build Docker Image for Astro App + run: | + echo "Building Docker image for Astro application..." + # Este comando asume que el Dockerfile está en la raíz de tu repositorio. + # GitHub Actions tendrá acceso a este Dockerfile porque forma parte del código 'checked out'. + docker build -t astro-app . + + - name: Run Docker Container for Astro App + run: | + echo "Starting Astro application Docker container in background..." + # Inicia el contenedor Docker. + # -p 4321:4321 mapea el puerto del contenedor al puerto del host del runner. + docker run -d -p 4321:4321 --name my-astro-app astro-app + + echo "Waiting for Astro Docker container to be healthy on port 4321..." + # Espera a que la aplicación dentro del contenedor esté lista para recibir peticiones. + for i in `seq 1 60`; do + curl -s http://localhost:4321 > /dev/null && break + echo "Astro app not ready yet, waiting 1 second..." + sleep 1 + done + echo "Astro app in Docker container should be running now." + + # --- Selenium and Browser Setup --- - name: Setup Node.js environment - uses: actions/setup-node@v4 # Configura el entorno de Node.js, necesario para 'selenium-side-runner'. + uses: actions/setup-node@v4 with: - node-version: 18 # Se recomienda usar una versión LTS (Long Term Support) de Node.js. + node-version: 18 - - name: Install Google Chrome Stable + - name: Install Firefox Browser run: | echo "Updating apt package lists..." - sudo apt-get update # Actualiza la lista de paquetes disponibles. - - echo "Installing necessary dependencies for Chrome..." - sudo apt-get install -y wget gnupg unzip # Instala herramientas básicas necesarias para la instalación de Chrome. - - echo "Adding Google Chrome GPG key..." - # Añade la clave GPG de Google para verificar la autenticidad del paquete de Chrome. - # Aunque 'apt-key' está deprecado, sigue siendo funcional en muchos entornos de CI. - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - - - echo "Adding Google Chrome repository to sources list..." - # Añade el repositorio de Google Chrome a la lista de fuentes de paquetes. - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list - - echo "Updating apt package lists again to include Chrome repository..." - sudo apt-get update # Vuelve a actualizar la lista de paquetes para que incluya Chrome. - - echo "Installing google-chrome-stable..." - sudo apt-get install -y google-chrome-stable # Instala la versión estable de Google Chrome. - - - name: Install selenium-side-runner - run: npm install -g selenium-side-runner # Instala el paquete 'selenium-side-runner' globalmente. + sudo apt-get update -y + echo "Installing Firefox..." + sudo apt-get install -y firefox-esr + - name: Install selenium-side-runner globally + run: npm install -g selenium-side-runner - # --- Primer Grupo de Tests: Ideal-tests-local --- - - name: Prepare environment for Ideal-tests-local + # --- START TEST SUITE 1: Ideal-tests-local --- + - name: Prepare environment for Ideal-tests-local (Firefox) run: | - echo "Ensuring all Chrome/ChromeDriver processes are stopped for Ideal-tests-local..." - # Mata de forma agresiva cualquier proceso de Chrome o ChromeDriver que pueda estar ejecutándose. - # '|| true' asegura que el paso no falle si no hay procesos que matar. - sudo pkill -9 chrome || true - sudo pkill -9 chromedriver || true + echo "Ensuring all Firefox/Geckodriver processes are stopped for Ideal-tests-local..." + sudo pkill -9 firefox || true + sudo pkill -9 geckodriver || true + sleep 2 - echo "Cleaning up user data directory: /tmp/selenium_profile_local" - # Elimina el directorio de perfil de usuario para asegurar un inicio limpio y evitar conflictos. - # Usamos un nombre de directorio único para este conjunto de tests. - rm -rf /tmp/selenium_profile_local + echo "Cleaning up user data directory for Firefox: /tmp/firefox_profile_local" + rm -rf /tmp/firefox_profile_local - - name: Run Selenium Tests for Ideal-tests-local.side + - name: Run Selenium Tests for Ideal-tests-local.side on Firefox run: | - echo "Executing Ideal-tests-local.side..." - # Ejecuta los tests de Selenium IDE para el archivo 'Ideal-tests-local.side'. - # -c para opciones de Chrome: - # "browserName": "chrome" - Especifica el navegador. - # "goog:chromeOptions": {"args": [...]} - Opciones específicas para Chrome. - # "--headless": Ejecuta Chrome sin interfaz gráfica, esencial para CI. - # "--disable-gpu": Deshabilita el uso de la GPU (recomendado en entornos virtuales). - # "--no-sandbox": Necesario en algunos entornos de CI para evitar problemas de permisos. - # "--user-data-dir=/tmp/selenium_profile_local": Usa un directorio de datos de usuario específico y único. + echo "Executing Ideal-tests-local.side on Firefox..." selenium-side-runner \ - -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_local"]}}' \ + -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless","-profile","/tmp/firefox_profile_local"]}}' \ tests/dev-local/Ideal-tests-local.side - # --- Segundo Grupo de Tests: ideal-tests-prod --- - - name: Prepare environment for ideal-tests-prod + # --- START TEST SUITE 2: ideal-tests-prod --- + - name: Prepare environment for ideal-tests-prod (Firefox) run: | - echo "Ensuring all Chrome/ChromeDriver processes are stopped for ideal-tests-prod..." - sudo pkill -9 chrome || true - sudo pkill -9 chromedriver || true + echo "Ensuring all Firefox/Geckodriver processes are stopped for ideal-tests-prod..." + sudo pkill -9 firefox || true + sudo pkill -9 geckodriver || true + sleep 2 - echo "Cleaning up user data directory: /tmp/selenium_profile_prod" - # Usamos un directorio de perfil diferente para este segundo conjunto de tests. - rm -rf /tmp/selenium_profile_prod + echo "Cleaning up user data directory for Firefox: /tmp/firefox_profile_prod" + rm -rf /tmp/firefox_profile_prod - - name: Run Selenium Tests for ideal-tests-prod.side + - name: Run Selenium Tests for ideal-tests-prod.side on Firefox run: | - echo "Executing ideal-tests-prod.side..." + echo "Executing ideal-tests-prod.side on Firefox..." selenium-side-runner \ - -c '{"browserName":"chrome","goog:chromeOptions":{"args":["--headless","--disable-gpu","--no-sandbox","--user-data-dir=/tmp/selenium_profile_prod"]}}' \ + -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless","-profile","/tmp/firefox_profile_prod"]}}' \ tests/prod/ideal-tests-prod.side \ No newline at end of file From 6d3cc9ef1e65883712508fcac97d81412a574b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Thu, 24 Jul 2025 17:37:02 -0300 Subject: [PATCH 16/23] test: tests con chrome y docker --- .github/workflows/selenium.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index f7e534e..3573707 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -3,33 +3,28 @@ name: Run Selenium IDE tests with Dockerized Astro App on: pull_request: branches: - - cardinal-quarter # Este workflow se activa cuando hay un PR hacia 'cardinal-quarter'. + - cardinal-quarter jobs: selenium-tests: - runs-on: ubuntu-latest # El entorno en el que se ejecutarán los tests. + runs-on: ubuntu-latest # El sistema operativo para el runner de GitHub Actions. steps: - name: Checkout repository code - uses: actions/checkout@v4 # Obtiene el código de tu repositorio. En un PR, esto suele ser una combinación del HEAD de la rama base y los cambios de la rama del PR. Crucialmente, tendrá acceso al Dockerfile de la rama 'cardinal-quarter'. + uses: actions/checkout@v4 # --- Docker Configuration for Astro App --- - name: Build Docker Image for Astro App run: | echo "Building Docker image for Astro application..." - # Este comando asume que el Dockerfile está en la raíz de tu repositorio. - # GitHub Actions tendrá acceso a este Dockerfile porque forma parte del código 'checked out'. docker build -t astro-app . - name: Run Docker Container for Astro App run: | echo "Starting Astro application Docker container in background..." - # Inicia el contenedor Docker. - # -p 4321:4321 mapea el puerto del contenedor al puerto del host del runner. docker run -d -p 4321:4321 --name my-astro-app astro-app echo "Waiting for Astro Docker container to be healthy on port 4321..." - # Espera a que la aplicación dentro del contenedor esté lista para recibir peticiones. for i in `seq 1 60`; do curl -s http://localhost:4321 > /dev/null && break echo "Astro app not ready yet, waiting 1 second..." @@ -47,12 +42,15 @@ jobs: run: | echo "Updating apt package lists..." sudo apt-get update -y - echo "Installing Firefox..." - sudo apt-get install -y firefox-esr + echo "Installing Firefox (default package)..." + # CAMBIO AQUÍ: Usamos 'firefox' en lugar de 'firefox-esr' + sudo apt-get install -y firefox - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner + # ... (el resto de los pasos para ejecutar los tests son los mismos) ... + # --- START TEST SUITE 1: Ideal-tests-local --- - name: Prepare environment for Ideal-tests-local (Firefox) run: | From 20627589e3564b243759c22213d86ebe89d2464e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 08:12:05 -0300 Subject: [PATCH 17/23] test: tests con docker (otra vez) --- .github/workflows/selenium.yml | 63 ++++++---------------------------- 1 file changed, 11 insertions(+), 52 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 3573707..85656f5 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -1,38 +1,31 @@ -name: Run Selenium IDE tests with Dockerized Astro App +name: Basic Selenium IDE Tests with Dockerized Astro App on: pull_request: branches: - - cardinal-quarter + - cardinal-quarter # Se ejecuta en Pull Requests a la rama 'cardinal-quarter'. jobs: selenium-tests: - runs-on: ubuntu-latest # El sistema operativo para el runner de GitHub Actions. + runs-on: ubuntu-latest # El sistema operativo del runner de GitHub Actions. steps: - name: Checkout repository code uses: actions/checkout@v4 - # --- Docker Configuration for Astro App --- - name: Build Docker Image for Astro App - run: | - echo "Building Docker image for Astro application..." - docker build -t astro-app . + run: docker build -t astro-app . - name: Run Docker Container for Astro App run: | - echo "Starting Astro application Docker container in background..." - docker run -d -p 4321:4321 --name my-astro-app astro-app - - echo "Waiting for Astro Docker container to be healthy on port 4321..." + # CAMBIO CRUCIAL AQUÍ: Mapeamos el puerto 4000 del host al 4321 del contenedor + docker run -d -p 4000:4321 --name my-astro-app astro-app + # Verificamos el puerto 4000 en el host, que es donde el runner se conectará for i in `seq 1 60`; do - curl -s http://localhost:4321 > /dev/null && break - echo "Astro app not ready yet, waiting 1 second..." + curl -s http://localhost:4000 > /dev/null && break sleep 1 done - echo "Astro app in Docker container should be running now." - # --- Selenium and Browser Setup --- - name: Setup Node.js environment uses: actions/setup-node@v4 with: @@ -40,49 +33,15 @@ jobs: - name: Install Firefox Browser run: | - echo "Updating apt package lists..." sudo apt-get update -y - echo "Installing Firefox (default package)..." - # CAMBIO AQUÍ: Usamos 'firefox' en lugar de 'firefox-esr' sudo apt-get install -y firefox - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner - # ... (el resto de los pasos para ejecutar los tests son los mismos) ... - - # --- START TEST SUITE 1: Ideal-tests-local --- - - name: Prepare environment for Ideal-tests-local (Firefox) - run: | - echo "Ensuring all Firefox/Geckodriver processes are stopped for Ideal-tests-local..." - sudo pkill -9 firefox || true - sudo pkill -9 geckodriver || true - sleep 2 - - echo "Cleaning up user data directory for Firefox: /tmp/firefox_profile_local" - rm -rf /tmp/firefox_profile_local - - name: Run Selenium Tests for Ideal-tests-local.side on Firefox run: | - echo "Executing Ideal-tests-local.side on Firefox..." - selenium-side-runner \ - -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless","-profile","/tmp/firefox_profile_local"]}}' \ - tests/dev-local/Ideal-tests-local.side - - # --- START TEST SUITE 2: ideal-tests-prod --- - - name: Prepare environment for ideal-tests-prod (Firefox) - run: | - echo "Ensuring all Firefox/Geckodriver processes are stopped for ideal-tests-prod..." - sudo pkill -9 firefox || true - sudo pkill -9 geckodriver || true - sleep 2 - - echo "Cleaning up user data directory for Firefox: /tmp/firefox_profile_prod" - rm -rf /tmp/firefox_profile_prod - - - name: Run Selenium Tests for ideal-tests-prod.side on Firefox - run: | - echo "Executing ideal-tests-prod.side on Firefox..." + # Tus tests deben apuntar a http://localhost:4000 selenium-side-runner \ - -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless","-profile","/tmp/firefox_profile_prod"]}}' \ - tests/prod/ideal-tests-prod.side \ No newline at end of file + -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless"]}}' \ + tests/dev-local/Ideal-tests-local.side \ No newline at end of file From 3ef471ef8cd384bc3fbf0cd89e0fa4a10a2a41dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 08:36:01 -0300 Subject: [PATCH 18/23] test: tests con docker (otra vez pt 2) --- .github/workflows/selenium.yml | 55 +++++++++++++++++--------- tests/dev-local/Ideal-tests-local.side | 8 ++-- 2 files changed, 41 insertions(+), 22 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 85656f5..ceaa678 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -1,47 +1,66 @@ -name: Basic Selenium IDE Tests with Dockerized Astro App +name: Robust Selenium IDE Tests with Docker Compose Astro App and Selenium Container on: pull_request: branches: - - cardinal-quarter # Se ejecuta en Pull Requests a la rama 'cardinal-quarter'. + - cardinal-quarter jobs: selenium-tests: - runs-on: ubuntu-latest # El sistema operativo del runner de GitHub Actions. + runs-on: ubuntu-latest + + services: + # El servicio de Selenium (Firefox) permanece igual. + # Se ejecutará en paralelo con los pasos del job. + selenium-firefox: + image: selenium/standalone-firefox:latest + ports: + - "4444:4444" + - "7900:7900" + volumes: + - /dev/shm:/dev/shm + options: --shm-size=2g steps: - name: Checkout repository code uses: actions/checkout@v4 - - name: Build Docker Image for Astro App - run: docker build -t astro-app . - - - name: Run Docker Container for Astro App + # --- Docker Compose para la aplicación Astro --- + - name: Bring up Astro App with Docker Compose run: | - # CAMBIO CRUCIAL AQUÍ: Mapeamos el puerto 4000 del host al 4321 del contenedor - docker run -d -p 4000:4321 --name my-astro-app astro-app - # Verificamos el puerto 4000 en el host, que es donde el runner se conectará + echo "Starting Astro application with Docker Compose..." + # Este comando levanta todos los servicios definidos en tu docker-compose.yml. + # -d para ejecutar en segundo plano (detached mode). + docker compose up -d + + echo "Waiting for Astro app to be healthy on localhost:4000 (mapped from container port 4321)..." + # Verifica el puerto del HOST (4000) que se mapea al contenedor. for i in `seq 1 60`; do curl -s http://localhost:4000 > /dev/null && break sleep 1 done + echo "Astro app should be running now." - name: Setup Node.js environment uses: actions/setup-node@v4 with: node-version: 18 - - name: Install Firefox Browser - run: | - sudo apt-get update -y - sudo apt-get install -y firefox - - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner - - name: Run Selenium Tests for Ideal-tests-local.side on Firefox + # --- Ejecución de Tests de Selenium IDE --- + # Tus tests de Selenium IDE (en los archivos .side) deben apuntar a http://localhost:4000 + - name: Run Selenium Tests for Ideal-tests-local.side + run: | + selenium-side-runner \ + --server http://localhost:4444/wd/hub \ + -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless"]}}' \ + tests/dev-local/Ideal-tests-local.side + + - name: Run Selenium Tests for ideal-tests-prod.side run: | - # Tus tests deben apuntar a http://localhost:4000 selenium-side-runner \ + --server http://localhost:4444/wd/hub \ -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless"]}}' \ - tests/dev-local/Ideal-tests-local.side \ No newline at end of file + tests/prod/ideal-tests-prod.side \ No newline at end of file diff --git a/tests/dev-local/Ideal-tests-local.side b/tests/dev-local/Ideal-tests-local.side index 0f3032f..6a8c5cf 100644 --- a/tests/dev-local/Ideal-tests-local.side +++ b/tests/dev-local/Ideal-tests-local.side @@ -10,7 +10,7 @@ "id": "87ec0025-fb7f-49dc-8868-fe8432136865", "comment": "", "command": "open", - "target": "http://localhost:4321/", + "target": "http://localhost:4000/", "targets": [], "value": "" }, { @@ -77,7 +77,7 @@ "id": "2f4b5cdb-7e80-4fbc-9d9e-ba2097c95fdf", "comment": "", "command": "open", - "target": "http://localhost:4321/", + "target": "http://localhost:4000/", "targets": [], "value": "" }, { @@ -239,7 +239,7 @@ "id": "8f0656d9-03db-4db4-90bd-7fe8092509c8", "comment": "", "command": "open", - "target": "http://localhost:4321/", + "target": "http://localhost:4000/", "targets": [], "value": "" }, { @@ -314,7 +314,7 @@ "id": "17ef9f0d-6ef1-44db-aec7-1019fd25ed0a", "comment": "", "command": "open", - "target": "http://localhost:4321/", + "target": "http://localhost:4000/", "targets": [], "value": "" }, { From 3cca2c0b1e5c1d2f711c49f433f407ef317c3da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 08:45:38 -0300 Subject: [PATCH 19/23] test: tests con docker (otra vez pt 3) --- .github/workflows/selenium.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index ceaa678..5742d64 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -10,33 +10,38 @@ jobs: runs-on: ubuntu-latest services: - # El servicio de Selenium (Firefox) permanece igual. - # Se ejecutará en paralelo con los pasos del job. + # --- SOLO el Contenedor de Selenium (Firefox) se define aquí --- selenium-firefox: - image: selenium/standalone-firefox:latest + image: selenium/standalone-firefox:4.17.0-20240124 # Versión específica y estable ports: - - "4444:4444" - - "7900:7900" + - "4444:4444" # Puerto para el Selenium WebDriver + - "7900:7900" # Opcional: Puerto VNC para ver la ejecución (comentar en producción) volumes: - - /dev/shm:/dev/shm - options: --shm-size=2g + - /dev/shm:/dev/shm # Requiere /dev/shm para rendimiento de navegador + options: --shm-size=2g # Aumenta el tamaño de memoria compartida para Firefox en Docker + # Healthcheck para asegurar que Selenium Grid esté listo + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:4444/wd/hub/status || exit 1"] + interval: 5s + timeout: 10s + retries: 10 steps: - name: Checkout repository code uses: actions/checkout@v4 - # --- Docker Compose para la aplicación Astro --- + # --- Docker Compose para la aplicación Astro (AHORA SÓLO EN STEPS) --- - name: Bring up Astro App with Docker Compose run: | echo "Starting Astro application with Docker Compose..." - # Este comando levanta todos los servicios definidos en tu docker-compose.yml. - # -d para ejecutar en segundo plano (detached mode). + # docker compose up -d construirá la imagen de Astro (si el docker-compose.yml lo especifica) + # y levantará el contenedor Astro, con su mapeo de puertos 4000:4321. docker compose up -d echo "Waiting for Astro app to be healthy on localhost:4000 (mapped from container port 4321)..." - # Verifica el puerto del HOST (4000) que se mapea al contenedor. for i in `seq 1 60`; do curl -s http://localhost:4000 > /dev/null && break + echo "Astro app not ready yet, waiting 1 second..." sleep 1 done echo "Astro app should be running now." @@ -55,12 +60,12 @@ jobs: run: | selenium-side-runner \ --server http://localhost:4444/wd/hub \ - -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless"]}}' \ + -c '{"browserName":"firefox"}' \ tests/dev-local/Ideal-tests-local.side - name: Run Selenium Tests for ideal-tests-prod.side run: | selenium-side-runner \ --server http://localhost:4444/wd/hub \ - -c '{"browserName":"firefox","moz:firefoxOptions":{"args":["--headless"]}}' \ + -c '{"browserName":"firefox"}' \ tests/prod/ideal-tests-prod.side \ No newline at end of file From ea4f787f7f82b3c13507e87c15103858db917223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 08:48:55 -0300 Subject: [PATCH 20/23] test: tests con docker (otra vez pt 4) --- .github/workflows/selenium.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 5742d64..dbedf76 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -12,30 +12,23 @@ jobs: services: # --- SOLO el Contenedor de Selenium (Firefox) se define aquí --- selenium-firefox: - image: selenium/standalone-firefox:4.17.0-20240124 # Versión específica y estable + image: selenium/standalone-firefox:4.17.0-20240124 ports: - - "4444:4444" # Puerto para el Selenium WebDriver - - "7900:7900" # Opcional: Puerto VNC para ver la ejecución (comentar en producción) + - "4444:4444" + - "7900:7900" volumes: - - /dev/shm:/dev/shm # Requiere /dev/shm para rendimiento de navegador + - /dev/shm:/dev/shm options: --shm-size=2g # Aumenta el tamaño de memoria compartida para Firefox en Docker - # Healthcheck para asegurar que Selenium Grid esté listo - healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:4444/wd/hub/status || exit 1"] - interval: 5s - timeout: 10s - retries: 10 + # --- healthcheck ELIMINADO de aquí --- + # GitHub Actions no soporta 'healthcheck' directamente en este nivel del bloque 'services'. steps: - name: Checkout repository code uses: actions/checkout@v4 - # --- Docker Compose para la aplicación Astro (AHORA SÓLO EN STEPS) --- - name: Bring up Astro App with Docker Compose run: | echo "Starting Astro application with Docker Compose..." - # docker compose up -d construirá la imagen de Astro (si el docker-compose.yml lo especifica) - # y levantará el contenedor Astro, con su mapeo de puertos 4000:4321. docker compose up -d echo "Waiting for Astro app to be healthy on localhost:4000 (mapped from container port 4321)..." @@ -54,8 +47,14 @@ jobs: - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner + # --- Pausa para asegurar que Selenium esté listo --- + - name: Wait for Selenium Firefox service to be fully ready + run: | + echo "Waiting an additional 15 seconds for Selenium Firefox to stabilize..." + sleep 15 + # Confiamos en esta pausa para dar tiempo al contenedor de Selenium. + # --- Ejecución de Tests de Selenium IDE --- - # Tus tests de Selenium IDE (en los archivos .side) deben apuntar a http://localhost:4000 - name: Run Selenium Tests for Ideal-tests-local.side run: | selenium-side-runner \ From 5bdb1f7076ade2cd5d2a6192a2a4dff3042cbdf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 08:51:09 -0300 Subject: [PATCH 21/23] test: tests con docker (otra vez pt 4) --- .github/workflows/selenium.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index dbedf76..bb292a8 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -10,17 +10,15 @@ jobs: runs-on: ubuntu-latest services: - # --- SOLO el Contenedor de Selenium (Firefox) se define aquí --- selenium-firefox: - image: selenium/standalone-firefox:4.17.0-20240124 + # --- CAMBIO CLAVE AQUÍ: Usamos una versión específica y más reciente --- + image: selenium/standalone-firefox:4.22.0 # O la última versión estable que encuentres en Docker Hub ports: - "4444:4444" - "7900:7900" volumes: - /dev/shm:/dev/shm - options: --shm-size=2g # Aumenta el tamaño de memoria compartida para Firefox en Docker - # --- healthcheck ELIMINADO de aquí --- - # GitHub Actions no soporta 'healthcheck' directamente en este nivel del bloque 'services'. + options: --shm-size=2g steps: - name: Checkout repository code @@ -28,16 +26,11 @@ jobs: - name: Bring up Astro App with Docker Compose run: | - echo "Starting Astro application with Docker Compose..." docker compose up -d - - echo "Waiting for Astro app to be healthy on localhost:4000 (mapped from container port 4321)..." for i in `seq 1 60`; do curl -s http://localhost:4000 > /dev/null && break - echo "Astro app not ready yet, waiting 1 second..." sleep 1 done - echo "Astro app should be running now." - name: Setup Node.js environment uses: actions/setup-node@v4 @@ -47,14 +40,11 @@ jobs: - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner - # --- Pausa para asegurar que Selenium esté listo --- - name: Wait for Selenium Firefox service to be fully ready run: | echo "Waiting an additional 15 seconds for Selenium Firefox to stabilize..." sleep 15 - # Confiamos en esta pausa para dar tiempo al contenedor de Selenium. - # --- Ejecución de Tests de Selenium IDE --- - name: Run Selenium Tests for Ideal-tests-local.side run: | selenium-side-runner \ From 97441e7664a1256587de3e59a411b547932c07f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 08:58:59 -0300 Subject: [PATCH 22/23] test: tests con docker (otra vez pt 4) --- .github/workflows/selenium.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index bb292a8..1e9ba75 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -11,8 +11,7 @@ jobs: services: selenium-firefox: - # --- CAMBIO CLAVE AQUÍ: Usamos una versión específica y más reciente --- - image: selenium/standalone-firefox:4.22.0 # O la última versión estable que encuentres en Docker Hub + image: selenium/standalone-firefox:4.22.0 ports: - "4444:4444" - "7900:7900" @@ -26,11 +25,15 @@ jobs: - name: Bring up Astro App with Docker Compose run: | + echo "Starting Astro application with Docker Compose..." docker compose up -d + echo "Waiting for Astro app to be healthy on localhost:4000 (mapped from container port 4321)..." for i in `seq 1 60`; do curl -s http://localhost:4000 > /dev/null && break + echo "Astro app not ready yet, waiting 1 second..." sleep 1 done + echo "Astro app should be running now." - name: Setup Node.js environment uses: actions/setup-node@v4 @@ -40,16 +43,19 @@ jobs: - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner + # --- Aumentamos la pausa para dar tiempo a Selenium/Firefox --- - name: Wait for Selenium Firefox service to be fully ready run: | - echo "Waiting an additional 15 seconds for Selenium Firefox to stabilize..." - sleep 15 + echo "Waiting an additional 30 seconds for Selenium Firefox to stabilize..." + sleep 30 # Aumentamos la pausa a 30 segundos + # --- Ejecución de Tests de Selenium IDE --- - name: Run Selenium Tests for Ideal-tests-local.side run: | selenium-side-runner \ --server http://localhost:4444/wd/hub \ -c '{"browserName":"firefox"}' \ + --timeout 60000 \ # Aumentamos el timeout a 60 segundos (60000 ms) tests/dev-local/Ideal-tests-local.side - name: Run Selenium Tests for ideal-tests-prod.side @@ -57,4 +63,5 @@ jobs: selenium-side-runner \ --server http://localhost:4444/wd/hub \ -c '{"browserName":"firefox"}' \ + --timeout 60000 \ # Aumentamos el timeout a 60 segundos (60000 ms) tests/prod/ideal-tests-prod.side \ No newline at end of file From c2b5b20093da0a358592f650b9fac11e2c24e817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Islas?= Date: Fri, 25 Jul 2025 09:10:51 -0300 Subject: [PATCH 23/23] test: tests con docker --- .github/workflows/selenium.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 1e9ba75..a27ba64 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -43,25 +43,15 @@ jobs: - name: Install selenium-side-runner globally run: npm install -g selenium-side-runner - # --- Aumentamos la pausa para dar tiempo a Selenium/Firefox --- - name: Wait for Selenium Firefox service to be fully ready run: | echo "Waiting an additional 30 seconds for Selenium Firefox to stabilize..." - sleep 30 # Aumentamos la pausa a 30 segundos + sleep 30 - # --- Ejecución de Tests de Selenium IDE --- + # --- CAMBIO CRUCIAL AQUÍ: Comando en una sola línea --- - name: Run Selenium Tests for Ideal-tests-local.side - run: | - selenium-side-runner \ - --server http://localhost:4444/wd/hub \ - -c '{"browserName":"firefox"}' \ - --timeout 60000 \ # Aumentamos el timeout a 60 segundos (60000 ms) - tests/dev-local/Ideal-tests-local.side + run: selenium-side-runner --server http://localhost:4444/wd/hub -c '{"browserName":"firefox"}' --timeout 60000 tests/dev-local/Ideal-tests-local.side + # --- Y TAMBIÉN AQUÍ: Comando en una sola línea --- - name: Run Selenium Tests for ideal-tests-prod.side - run: | - selenium-side-runner \ - --server http://localhost:4444/wd/hub \ - -c '{"browserName":"firefox"}' \ - --timeout 60000 \ # Aumentamos el timeout a 60 segundos (60000 ms) - tests/prod/ideal-tests-prod.side \ No newline at end of file + run: selenium-side-runner --server http://localhost:4444/wd/hub -c '{"browserName":"firefox"}' --timeout 60000 tests/prod/ideal-tests-prod.side \ No newline at end of file