From 94f966a74b8fb309ba2017c128073c47afcda968 Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Thu, 11 Jul 2024 10:51:23 +0200 Subject: [PATCH 1/8] Add UI tests --- .github/workflows/ui-test/sanity.json | 37 ++++++++++++++++++++++++++- tests/UI/docker-compose.yml | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui-test/sanity.json b/.github/workflows/ui-test/sanity.json index 6d20ae887..b5e6a73f8 100644 --- a/.github/workflows/ui-test/sanity.json +++ b/.github/workflows/ui-test/sanity.json @@ -1,6 +1,41 @@ { "include": [ { + "comment": "1.7.5 ~ minor PHP 7.1 ~ 7.2" + }, + { + "PS_VERSION_START": "1.7.5.0", + "PS_VERSION_END": "1.7.8.11", + "UPGRADE_CHANNEL": "minor", + "PHP_VERSION": "7.1", + "IMG_DOCKER": "1.7.5.0" + }, + { + "PS_VERSION_START": "1.7.5.0", + "PS_VERSION_END": "1.7.8.11", + "UPGRADE_CHANNEL": "minor", + "PHP_VERSION": "7.2", + "IMG_DOCKER": "1.7.5.0" + }, + { + "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_END": "1.7.8.11", + "UPGRADE_CHANNEL": "minor", + "PHP_VERSION": "7.1", + "IMG_DOCKER": "1.7.5.1" + }, + { + "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_END": "1.7.8.11", + "UPGRADE_CHANNEL": "minor", + "PHP_VERSION": "7.2", + "IMG_DOCKER": "1.7.5.1" + }, + { + "comment": "@todo 1.7.5.2" + }, + { + "comment": "1.7.8 ~ minor PHP 7.2 ~ 7.4" "comment": "1.7.6.0 -> 1.7.8.11 PHP 7.1" }, { @@ -65,4 +100,4 @@ "PHP_VERSION": "8.1" } ] -} \ No newline at end of file +} diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index f86e9a96c..0d73d8cfd 100644 --- a/tests/UI/docker-compose.yml +++ b/tests/UI/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.7' services: prestashop: - image: prestashop/prestashop:${PS_VERSION}-apache + image: prestashop/prestashop:${PS_VERSION} container_name: prestashop depends_on: - mysql From 025384efd696083f5dba383fee76b2507d7def54 Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Thu, 18 Jul 2024 12:43:03 +0200 Subject: [PATCH 2/8] Use mysql 5.7 --- .github/workflows/ui-test/sanity.json | 23 ++++++++++++++--------- tests/UI/docker-compose.yml | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ui-test/sanity.json b/.github/workflows/ui-test/sanity.json index b5e6a73f8..f27fc0fb5 100644 --- a/.github/workflows/ui-test/sanity.json +++ b/.github/workflows/ui-test/sanity.json @@ -7,32 +7,37 @@ "PS_VERSION_START": "1.7.5.0", "PS_VERSION_END": "1.7.8.11", "UPGRADE_CHANNEL": "minor", - "PHP_VERSION": "7.1", - "IMG_DOCKER": "1.7.5.0" + "PHP_VERSION": "7.1" }, { "PS_VERSION_START": "1.7.5.0", "PS_VERSION_END": "1.7.8.11", "UPGRADE_CHANNEL": "minor", - "PHP_VERSION": "7.2", - "IMG_DOCKER": "1.7.5.0" + "PHP_VERSION": "7.2" }, { "PS_VERSION_START": "1.7.5.1", "PS_VERSION_END": "1.7.8.11", "UPGRADE_CHANNEL": "minor", - "PHP_VERSION": "7.1", - "IMG_DOCKER": "1.7.5.1" + "PHP_VERSION": "7.1" }, { "PS_VERSION_START": "1.7.5.1", "PS_VERSION_END": "1.7.8.11", "UPGRADE_CHANNEL": "minor", - "PHP_VERSION": "7.2", - "IMG_DOCKER": "1.7.5.1" + "PHP_VERSION": "7.2" }, { - "comment": "@todo 1.7.5.2" + "PS_VERSION_START": "1.7.5.2", + "PS_VERSION_END": "1.7.8.11", + "UPGRADE_CHANNEL": "minor", + "PHP_VERSION": "7.1" + }, + { + "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_END": "1.7.8.11", + "UPGRADE_CHANNEL": "minor", + "PHP_VERSION": "7.2" }, { "comment": "1.7.8 ~ minor PHP 7.2 ~ 7.4" diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index 0d73d8cfd..f86e9a96c 100644 --- a/tests/UI/docker-compose.yml +++ b/tests/UI/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.7' services: prestashop: - image: prestashop/prestashop:${PS_VERSION} + image: prestashop/prestashop:${PS_VERSION}-apache container_name: prestashop depends_on: - mysql From c850570cbfbffa0a2952b7f7bdbb065b889fbcc0 Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Wed, 23 Oct 2024 17:56:18 +0200 Subject: [PATCH 3/8] Rebase --- .github/workflows/ui-test/sanity.json | 31 +++++++++---------- .../03_CRUDProductWithCombinations.spec.ts | 2 +- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ui-test/sanity.json b/.github/workflows/ui-test/sanity.json index f27fc0fb5..9b96f88b1 100644 --- a/.github/workflows/ui-test/sanity.json +++ b/.github/workflows/ui-test/sanity.json @@ -1,42 +1,41 @@ { "include": [ { - "comment": "1.7.5 ~ minor PHP 7.1 ~ 7.2" + "comment": "1.7.5.0 ~ 1.7.5.2 -> 1.7.8.11 PHP 7.1" }, { "PS_VERSION_START": "1.7.5.0", "PS_VERSION_END": "1.7.8.11", - "UPGRADE_CHANNEL": "minor", "PHP_VERSION": "7.1" }, + { - "PS_VERSION_START": "1.7.5.0", + "PS_VERSION_START": "1.7.5.1", "PS_VERSION_END": "1.7.8.11", - "UPGRADE_CHANNEL": "minor", - "PHP_VERSION": "7.2" + "PHP_VERSION": "7.1" }, + { - "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_START": "1.7.5.2", "PS_VERSION_END": "1.7.8.11", - "UPGRADE_CHANNEL": "minor", "PHP_VERSION": "7.1" }, { - "PS_VERSION_START": "1.7.5.1", - "PS_VERSION_END": "1.7.8.11", - "UPGRADE_CHANNEL": "minor", + "comment": "1.7.5.0 ~ 1.7.5.2 -> 8.2.0 PHP 7.2" + }, + { + "PS_VERSION_START": "1.7.5.0", + "PS_VERSION_END": "8.2.0", "PHP_VERSION": "7.2" }, { - "PS_VERSION_START": "1.7.5.2", - "PS_VERSION_END": "1.7.8.11", - "UPGRADE_CHANNEL": "minor", - "PHP_VERSION": "7.1" + "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_END": "8.2.0", + "PHP_VERSION": "7.2" }, { "PS_VERSION_START": "1.7.5.1", - "PS_VERSION_END": "1.7.8.11", - "UPGRADE_CHANNEL": "minor", + "PS_VERSION_END": "8.2.0", "PHP_VERSION": "7.2" }, { diff --git a/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts b/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts index 1bb29da49..a6f33a749 100755 --- a/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts +++ b/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts @@ -60,7 +60,7 @@ test.describe('BO - Catalog - Products : CRUD product with combinations', async attributes: [ { name: 'color', - values: ['Gray', 'Grey', 'Taupe', 'Red'], + values: ['Gray', 'Grey', 'Grey', 'Taupe', 'Red'], }, { name: 'size', From 9bd013a6083103142452d2468eef8df1242105ad Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Wed, 23 Oct 2024 17:58:57 +0200 Subject: [PATCH 4/8] Delete blanc lines --- .github/workflows/ui-test/sanity.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ui-test/sanity.json b/.github/workflows/ui-test/sanity.json index 9b96f88b1..01e1691f1 100644 --- a/.github/workflows/ui-test/sanity.json +++ b/.github/workflows/ui-test/sanity.json @@ -8,13 +8,11 @@ "PS_VERSION_END": "1.7.8.11", "PHP_VERSION": "7.1" }, - { "PS_VERSION_START": "1.7.5.1", "PS_VERSION_END": "1.7.8.11", "PHP_VERSION": "7.1" }, - { "PS_VERSION_START": "1.7.5.2", "PS_VERSION_END": "1.7.8.11", From 8bfc333b2f7f9edec97300c501f2d0dfe0d3b8f9 Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Tue, 29 Oct 2024 09:36:36 +0100 Subject: [PATCH 5/8] Rebase --- .github/workflows/ui-test/sanity.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ui-test/sanity.json b/.github/workflows/ui-test/sanity.json index 01e1691f1..4102f8f05 100644 --- a/.github/workflows/ui-test/sanity.json +++ b/.github/workflows/ui-test/sanity.json @@ -32,12 +32,11 @@ "PHP_VERSION": "7.2" }, { - "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_START": "1.7.5.2", "PS_VERSION_END": "8.2.0", "PHP_VERSION": "7.2" }, { - "comment": "1.7.8 ~ minor PHP 7.2 ~ 7.4" "comment": "1.7.6.0 -> 1.7.8.11 PHP 7.1" }, { From 6095b4bd9ae148a835891df33394430ed56a49bd Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Tue, 29 Oct 2024 09:42:14 +0100 Subject: [PATCH 6/8] Fix space --- tests/UI/campaigns/sanity/01_ordersBO/01_filterOrders.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/UI/campaigns/sanity/01_ordersBO/01_filterOrders.spec.ts b/tests/UI/campaigns/sanity/01_ordersBO/01_filterOrders.spec.ts index 515c0b11b..ff0403353 100755 --- a/tests/UI/campaigns/sanity/01_ordersBO/01_filterOrders.spec.ts +++ b/tests/UI/campaigns/sanity/01_ordersBO/01_filterOrders.spec.ts @@ -93,7 +93,7 @@ test.describe('BO - Orders - Orders : Filter the Orders table by ID, REFERENCE, }, ]; - tests.forEach((tst,index:number) => { + tests.forEach((tst, index: number) => { test(`should filter the Orders table by '${tst.args.filterBy}' and check the result`, async () => { await utilsTest.addContextItem(test.info(), 'testIdentifier', tst.args.identifier, baseContext); From ddc7fa778dc8210e2ea30d69032c10a48d170374 Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Tue, 29 Oct 2024 18:00:18 +0100 Subject: [PATCH 7/8] Update testing library --- .github/workflows/ui-test/nightly.json | 2 +- .../02_productsBO/03_CRUDProductWithCombinations.spec.ts | 2 +- tests/UI/campaigns/sanity/04_cartFO/01_editCheckCart.spec.ts | 2 +- tests/UI/package-lock.json | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ui-test/nightly.json b/.github/workflows/ui-test/nightly.json index 9a297f84c..a5f3c8e77 100644 --- a/.github/workflows/ui-test/nightly.json +++ b/.github/workflows/ui-test/nightly.json @@ -845,4 +845,4 @@ "PHP_VERSION": "8.1" } ] -} \ No newline at end of file +} diff --git a/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts b/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts index a6f33a749..1bb29da49 100755 --- a/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts +++ b/tests/UI/campaigns/sanity/02_productsBO/03_CRUDProductWithCombinations.spec.ts @@ -60,7 +60,7 @@ test.describe('BO - Catalog - Products : CRUD product with combinations', async attributes: [ { name: 'color', - values: ['Gray', 'Grey', 'Grey', 'Taupe', 'Red'], + values: ['Gray', 'Grey', 'Taupe', 'Red'], }, { name: 'size', diff --git a/tests/UI/campaigns/sanity/04_cartFO/01_editCheckCart.spec.ts b/tests/UI/campaigns/sanity/04_cartFO/01_editCheckCart.spec.ts index e9d7e2738..fe7cdbe25 100755 --- a/tests/UI/campaigns/sanity/04_cartFO/01_editCheckCart.spec.ts +++ b/tests/UI/campaigns/sanity/04_cartFO/01_editCheckCart.spec.ts @@ -127,7 +127,7 @@ test.describe('FO - Cart : Check Cart in FO', async () => { .toFixed(2)); }); - test('should get the product number and check that is equal to 2', async () => { + test('should get the products number and check that is equal to 2', async () => { await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkNumberOfProductsInCart', baseContext); totalATI = await foClassicCartPage.getATIPrice(page); diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 24f2c7cd5..eb6801f98 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -497,7 +497,7 @@ }, "node_modules/@prestashop-core/ui-testing": { "version": "0.0.12", - "resolved": "git+ssh://git@github.com/PrestaShop/ui-testing-library.git#70ed22a8618da206d47f3bc449370f83261953c0", + "resolved": "git+ssh://git@github.com/PrestaShop/ui-testing-library.git#211bf6644ad365a17c826802cfc774c91b03ae71", "license": "MIT", "dependencies": { "@faker-js/faker": "^9.0.3", @@ -6726,7 +6726,7 @@ } }, "@prestashop-core/ui-testing": { - "version": "git+ssh://git@github.com/PrestaShop/ui-testing-library.git#70ed22a8618da206d47f3bc449370f83261953c0", + "version": "git+ssh://git@github.com/PrestaShop/ui-testing-library.git#211bf6644ad365a17c826802cfc774c91b03ae71", "from": "@prestashop-core/ui-testing@https://github.com/PrestaShop/ui-testing-library#main", "requires": { "@faker-js/faker": "^9.0.3", From c2cd7f610064ecdaebab31ad2c4c3f6282974868 Mon Sep 17 00:00:00 2001 From: nesrineabdmouleh Date: Tue, 29 Oct 2024 19:07:52 +0100 Subject: [PATCH 8/8] Add 175 to nightly --- .github/workflows/ui-test/nightly.json | 36 ++++++++++++++++++++++++++ .github/workflows/ui-test/sanity.json | 36 -------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ui-test/nightly.json b/.github/workflows/ui-test/nightly.json index a5f3c8e77..98e1559a4 100644 --- a/.github/workflows/ui-test/nightly.json +++ b/.github/workflows/ui-test/nightly.json @@ -1,5 +1,41 @@ { "include": [ + { + "comment": "1.7.5.0 ~ 1.7.5.2 -> 1.7.8.11 PHP 7.1" + }, + { + "PS_VERSION_START": "1.7.5.0", + "PS_VERSION_END": "1.7.8.11", + "PHP_VERSION": "7.1" + }, + { + "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_END": "1.7.8.11", + "PHP_VERSION": "7.1" + }, + { + "PS_VERSION_START": "1.7.5.2", + "PS_VERSION_END": "1.7.8.11", + "PHP_VERSION": "7.1" + }, + { + "comment": "1.7.5.0 ~ 1.7.5.2 -> 8.2.0 PHP 7.2" + }, + { + "PS_VERSION_START": "1.7.5.0", + "PS_VERSION_END": "8.2.0", + "PHP_VERSION": "7.2" + }, + { + "PS_VERSION_START": "1.7.5.1", + "PS_VERSION_END": "8.2.0", + "PHP_VERSION": "7.2" + }, + { + "PS_VERSION_START": "1.7.5.2", + "PS_VERSION_END": "8.2.0", + "PHP_VERSION": "7.2" + }, { "comment": "1.7.6.0 ~ 1.7.6.9 -> 1.7.8.11 PHP 7.1" }, diff --git a/.github/workflows/ui-test/sanity.json b/.github/workflows/ui-test/sanity.json index 4102f8f05..119fd2dfd 100644 --- a/.github/workflows/ui-test/sanity.json +++ b/.github/workflows/ui-test/sanity.json @@ -1,41 +1,5 @@ { "include": [ - { - "comment": "1.7.5.0 ~ 1.7.5.2 -> 1.7.8.11 PHP 7.1" - }, - { - "PS_VERSION_START": "1.7.5.0", - "PS_VERSION_END": "1.7.8.11", - "PHP_VERSION": "7.1" - }, - { - "PS_VERSION_START": "1.7.5.1", - "PS_VERSION_END": "1.7.8.11", - "PHP_VERSION": "7.1" - }, - { - "PS_VERSION_START": "1.7.5.2", - "PS_VERSION_END": "1.7.8.11", - "PHP_VERSION": "7.1" - }, - { - "comment": "1.7.5.0 ~ 1.7.5.2 -> 8.2.0 PHP 7.2" - }, - { - "PS_VERSION_START": "1.7.5.0", - "PS_VERSION_END": "8.2.0", - "PHP_VERSION": "7.2" - }, - { - "PS_VERSION_START": "1.7.5.1", - "PS_VERSION_END": "8.2.0", - "PHP_VERSION": "7.2" - }, - { - "PS_VERSION_START": "1.7.5.2", - "PS_VERSION_END": "8.2.0", - "PHP_VERSION": "7.2" - }, { "comment": "1.7.6.0 -> 1.7.8.11 PHP 7.1" },