From 4ac0622bb2c093a82d65e12f04786fc1921f6c0b Mon Sep 17 00:00:00 2001 From: PICHAT Morgan Date: Thu, 1 Jun 2023 15:44:24 +0200 Subject: [PATCH 01/73] turn npm install to npm ci --- .github/workflows/build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 4f9f24e4..3505f77f 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -23,7 +23,7 @@ jobs: with: node-version: 14.x - - run: npm install + - run: npm ci - name: Build PrestaShop assets run: | From 9193f8b2e81288c512be212f3ce4bf1a11d88ef2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:53:20 +0000 Subject: [PATCH 02/73] Bump browserify-sign from 4.2.1 to 4.2.2 Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2. - [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md) - [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2) --- updated-dependencies: - dependency-name: browserify-sign dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index faef0ff3..5a20fe74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3435,32 +3435,32 @@ } }, "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", + "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", "dev": true, "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.4", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.6", + "readable-stream": "^3.6.2", + "safe-buffer": "^5.2.1" }, "dependencies": { "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "requires": { "inherits": "^2.0.3", From 09286065b305660425333cedd736852f75ffc41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:13:36 +0100 Subject: [PATCH 03/73] Update and rename upgrade-0.3.php to upgrade-0.3.0.php --- upgrade/{upgrade-0.3.php => upgrade-0.3.0.php} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename upgrade/{upgrade-0.3.php => upgrade-0.3.0.php} (96%) diff --git a/upgrade/upgrade-0.3.php b/upgrade/upgrade-0.3.0.php similarity index 96% rename from upgrade/upgrade-0.3.php rename to upgrade/upgrade-0.3.0.php index a761beaf..2e2dc2d1 100644 --- a/upgrade/upgrade-0.3.php +++ b/upgrade/upgrade-0.3.0.php @@ -26,7 +26,7 @@ * * @return bool */ -function upgrade_module_0_3($module) +function upgrade_module_0_3_0($module) { return $module->registerHook('displayProductListFunctionalButtons') && $module->registerHook('top'); From aaaa3f2e2bde172482a80912e92323080e63b65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:13:47 +0100 Subject: [PATCH 04/73] Update and rename upgrade-1.1.php to upgrade-1.1.0.php --- upgrade/{upgrade-1.1.php => upgrade-1.1.0.php} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename upgrade/{upgrade-1.1.php => upgrade-1.1.0.php} (97%) diff --git a/upgrade/upgrade-1.1.php b/upgrade/upgrade-1.1.0.php similarity index 97% rename from upgrade/upgrade-1.1.php rename to upgrade/upgrade-1.1.0.php index 2b160cd6..556c6b92 100644 --- a/upgrade/upgrade-1.1.php +++ b/upgrade/upgrade-1.1.0.php @@ -26,7 +26,7 @@ * * @return bool */ -function upgrade_module_1_1($module) +function upgrade_module_1_1_0($module) { $result = true; $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'wishlist`'); From e0179780d1115fcffdda8d86ca479b2f988c0514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:37:03 +0100 Subject: [PATCH 05/73] Update blockwishlist.php --- blockwishlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockwishlist.php b/blockwishlist.php index 0f795390..cbc8e7b8 100644 --- a/blockwishlist.php +++ b/blockwishlist.php @@ -72,7 +72,7 @@ public function __construct() { $this->name = 'blockwishlist'; $this->tab = 'front_office_features'; - $this->version = '3.0.1'; + $this->version = '3.0.2'; $this->author = 'PrestaShop'; $this->need_instance = 0; From 8d1e243eee05c7142605117a5bc4575bef933e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:38:05 +0100 Subject: [PATCH 06/73] Update config.xml --- config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 74f7a4b1..0751714c 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ blockwishlist - + From 29fa3b8bf3390226bb78d287367875ca1f3bd696 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 8 Jan 2024 11:10:19 +0100 Subject: [PATCH 07/73] Added UI Tests --- .github/workflows/ui-test.yml | 46 + .gitignore | 4 + package.json | 2 +- .../02_statisticsTabSettings.spec.ts | 169 +++ tests/UI/campaigns/example.spec.ts | 18 + tests/UI/docker-compose.yml | 41 + tests/UI/package-lock.json | 977 ++++++++++++++++++ tests/UI/package.json | 19 + tests/UI/playwright.config.ts | 115 +++ tests/UI/reporters/mochawesome.js | 3 + tests/UI/tsconfig.json | 25 + tests/{UI => js}/Button.spec.js | 0 tests/{UI => js}/Create.spec.js | 0 tests/{UI => js}/Delete.spec.js | 0 tests/{UI => js}/List.spec.js | 0 tests/{UI => js}/Login.spec.js | 0 tests/{UI => js}/Rename.spec.js | 0 tests/{UI => js}/Toast.spec.js | 0 tests/{UI => js}/setup.js | 0 19 files changed, 1418 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ui-test.yml create mode 100644 tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts create mode 100644 tests/UI/campaigns/example.spec.ts create mode 100644 tests/UI/docker-compose.yml create mode 100644 tests/UI/package-lock.json create mode 100644 tests/UI/package.json create mode 100644 tests/UI/playwright.config.ts create mode 100644 tests/UI/reporters/mochawesome.js create mode 100644 tests/UI/tsconfig.json rename tests/{UI => js}/Button.spec.js (100%) rename tests/{UI => js}/Create.spec.js (100%) rename tests/{UI => js}/Delete.spec.js (100%) rename tests/{UI => js}/List.spec.js (100%) rename tests/{UI => js}/Login.spec.js (100%) rename tests/{UI => js}/Rename.spec.js (100%) rename tests/{UI => js}/Toast.spec.js (100%) rename tests/{UI => js}/setup.js (100%) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml new file mode 100644 index 00000000..ab2017fb --- /dev/null +++ b/.github/workflows/ui-test.yml @@ -0,0 +1,46 @@ +name: UI Tests +on: [push, pull_request] +jobs: + ui_test: + name: UI Tests + runs-on: ubuntu-latest + strategy: + matrix: + ps-version: + - '8.0.5' + - '8.1.3' + - 'nightly' + env: + PS_VERSION: ${{ matrix.ps-version }} + steps: + - name: Checkout + uses: actions/checkout@v3.1.0 + + - uses: actions/setup-node@v3 + with: + node-version: 14 + + - name: Build + run: npm install && npm run build + + - name: Start containers + run: docker-compose -f "docker-compose.yml" up -d --build + + - name: Install dependencies + run: npm ci + working-directory: tests/UI/ + + - name: Install Playwright Browsers + run: npx playwright install --with-deps + working-directory: tests/UI/ + + - name: Run Playwright tests + run: npx playwright test + working-directory: tests/UI/ + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 83006710..65c4019e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ node_modules # mac .DS_Store + +## UI Tests +/tests/UI/node_modules/ +/tests/UI/reports/ diff --git a/package.json b/package.json index 96ae1de8..c7ac5feb 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "watch": "npm run dev", "lint": "eslint -c .eslintrc.js --ext .js,.vue .", "lint-fix": "eslint -c .eslintrc.js --ext .js,.vue . --fix", - "test": "mochapack --webpack-config .webpack/common.js --require tests/UI/setup.js tests/UI/**/*.spec.js" + "test": "mochapack --webpack-config .webpack/common.js --require tests/js/setup.js tests/js/**/*.spec.js" }, "author": "PrestaShop", "license": "AFL-3.0", diff --git a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts new file mode 100644 index 00000000..1bd7e132 --- /dev/null +++ b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts @@ -0,0 +1,169 @@ + +// Import utils +//import testContext from '@prestashop-core/ui-testing/dist/utils/testContext'; + +// Import commonTests +//import loginCommon from '@prestashop-core/ui-testing/dist/common/BO/loginBO'; + +// Import pages +// Import BO pages +import dashboardPage from '@prestashop-core/ui-testing/dist/pages/BO/dashboard'; +import loginPage from '@prestashop-core/ui-testing/dist/pages/BO/login'; +/* +import {moduleManager as moduleManagerPage} from '@pages/BO/modules/moduleManager'; +import blockwishlistPage from '@pages/BO/modules/blockwishlist'; +import blockwishlistStatisticsPage from '@pages/BO/modules/blockwishlist/statistics'; +// Import FO pages +import categoryPage from '@pages/FO/category'; +import {homePage} from '@pages/FO/home'; +import {loginPage as foLoginPage} from '@pages/FO/login'; + +// Import data +import Customers from '@data/demo/customers'; +import Modules from '@data/demo/modules';*/ + +import { test, expect } from '@playwright/test'; + +const baseContext: string = 'modules_blockwishlist_configuration_statisticsTabSettings'; + +test.describe('Wishlist module - Statistics tab settings', () => { + test('Check the Back Office: should login in BO', async ({ page }) => { + await loginPage.goTo(page, global.BO.URL); + await loginPage.successLogin(page, email, password); + + const pageTitle = await dashboardPage.getPageTitle(page); + expect(pageTitle).toContain(dashboardPage.pageTitle); + }); + + test('should go to \'Modules > Module Manager\' page', async ({ page }) => { + //await testContext.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPage', baseContext); + + await dashboardPage.goToSubMenu( + page, + dashboardPage.modulesParentLink, + dashboardPage.moduleManagerLink, + ); + /* + await moduleManagerPage.closeSfToolBar(page); + + const pageTitle = await moduleManagerPage.getPageTitle(page); + expect(pageTitle).to.contains(moduleManagerPage.pageTitle);*/ + }); +/* + test(`should search the module ${Modules.blockwishlist.name}`, async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'searchModule', baseContext); + + const isModuleVisible = await moduleManagerPage.searchModule(page, Modules.blockwishlist); + expect(isModuleVisible).to.eq(true); + }); + + test(`should go to the configuration page of the module '${Modules.blockwishlist.name}'`, async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'goToConfigurationPage', baseContext); + + await moduleManagerPage.goToConfigurationPage(page, Modules.blockwishlist.tag); + + const pageTitle = await blockwishlistPage.getPageTitle(page); + expect(pageTitle).to.eq(blockwishlistPage.pageTitle); + + const isConfigurationTabActive = await blockwishlistPage.isTabActive(page, 'Configuration'); + expect(isConfigurationTabActive).to.eq(true); + + const isStatisticsTabActive = await blockwishlistPage.isTabActive(page, 'Statistics'); + expect(isStatisticsTabActive).to.eq(false); + }); + + test('should go on Statistics Tab', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'goToStatisticsTab', baseContext); + + await blockwishlistPage.goToStatisticsTab(page); + + const pageTitle = await blockwishlistStatisticsPage.getPageTitle(page); + expect(pageTitle).to.eq(blockwishlistStatisticsPage.pageTitle); + + const noRecordsFoundText = await blockwishlistStatisticsPage.getTextForEmptyTable(page); + expect(noRecordsFoundText).to.contains('warning No records found'); + }); + }); + describe('Go to the FO and add to favorites some products', async () => { + test('should go to the FO', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'goToFO', baseContext); + + page = await blockwishlistStatisticsPage.viewMyShop(page); + await homePage.changeLanguage(page, 'en'); + + const isHomePage = await homePage.isHomePage(page); + expect(isHomePage).to.eq(true); + }); + + test('should go to login page', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'goToLoginPage', baseContext); + + await homePage.goToLoginPage(page); + + const pageTitle = await foLoginPage.getPageTitle(page); + expect(pageTitle, 'Fail to open FO login page').to.contains(foLoginPage.pageTitle); + }); + + test('should sign in with default customer', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'sighInFo', baseContext); + + await foLoginPage.customerLogin(page, Customers.johnDoe); + + const isCustomerConnected = await foLoginPage.isCustomerConnected(page); + expect(isCustomerConnected, 'Customer is not connected').to.eq(true); + }); + + test('should go to all products page', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'goToAllProducts', baseContext); + + await homePage.goToAllProductsPage(page); + + const isCategoryPageVisible = await categoryPage.isCategoryPage(page); + expect(isCategoryPageVisible).to.eq(true); + }); + + for (let idxProduct: number = 1; idxProduct <= 3; idxProduct++) { + // eslint-disable-next-line no-loop-func + test(`should add product #${idxProduct} to wishlist`, async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', `addToFavorite${idxProduct}`, baseContext); + + const textResult = await categoryPage.addToWishList(page, idxProduct); + expect(textResult).to.be.eq(categoryPage.messageAddedToWishlist); + + const isAddedToWishlist = await categoryPage.isAddedToWishlist(page, idxProduct); + expect(isAddedToWishlist).to.eq(true); + }); + } + + test('should logout', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'foLogout', baseContext); + + await categoryPage.logout(page); + + const isCustomerConnected = await homePage.isCustomerConnected(page); + expect(isCustomerConnected).to.eq(false); + }); + }); + describe('Return to BO and check statistics', async () => { + test('should go to BO', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'goToBoBack', baseContext); + + page = await homePage.closePage(browserContext, page, 0); + + const pageTitle = await blockwishlistStatisticsPage.getPageTitle(page); + expect(pageTitle).to.contains(blockwishlistStatisticsPage.pageTitle); + }); + // @todo : https://github.com/PrestaShop/PrestaShop/issues/33374 + test('should click on the refresh button', async ({ page }) => { + await testContext.addContextItem(this, 'testIdentifier', 'clickOnRefreshButton', baseContext); + + test.skip(); + + await blockwishlistStatisticsPage.refreshStatistics(page); + + // Check statistics + const pageTitle = await blockwishlistStatisticsPage.getPageTitle(page); + expect(pageTitle).to.contains(blockwishlistStatisticsPage.pageTitle); + }); + });*/ +}); diff --git a/tests/UI/campaigns/example.spec.ts b/tests/UI/campaigns/example.spec.ts new file mode 100644 index 00000000..54a906a4 --- /dev/null +++ b/tests/UI/campaigns/example.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test'; + +test('has title', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/Playwright/); +}); + +test('get started link', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Click the get started link. + await page.getByRole('link', { name: 'Get started' }).click(); + + // Expects page to have a heading with the name of Installation. + await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible(); +}); diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml new file mode 100644 index 00000000..5dc6f371 --- /dev/null +++ b/tests/UI/docker-compose.yml @@ -0,0 +1,41 @@ +services: + prestashop: + image: prestashop/prestashop-flashlight:${PS_VERSION} + container_name: prestashop + depends_on: + mysql: + condition: service_healthy + environment: + - DEBUG_MODE=true + volumes: + - type: bind + # Local Path + source: ../../ + # Mount Path + target: /var/www/html/modules/blockwishlist + ports: + - 8000:80 + + mysql: + image: mariadb:lts + container_name: prestashop-mysql + healthcheck: + test: + [ + 'CMD', + 'mysqladmin', + 'ping', + '--host=localhost', + '--user=prestashop', + '--password=prestashop', + ] + interval: 5s + timeout: 10s + retries: 5 + environment: + - MYSQL_HOST=mysql + - MYSQL_USER=prestashop + - MYSQL_PASSWORD=prestashop + - MYSQL_ROOT_PASSWORD=prestashop + - MYSQL_PORT=3306 + - MYSQL_DATABASE=prestashop \ No newline at end of file diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json new file mode 100644 index 00000000..4620d167 --- /dev/null +++ b/tests/UI/package-lock.json @@ -0,0 +1,977 @@ +{ + "name": "blockwishlist_tests_ui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "blockwishlist_tests_ui", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "dotenv": "^16.3.1" + }, + "devDependencies": { + "@playwright/test": "^1.40.1", + "@prestashop-core/ui-testing": "^0.0.2", + "@types/node": "^20.11.5", + "pwmochawesome": "^1.1.1", + "typescript": "^5.3.3" + } + }, + "node_modules/@playwright/test": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", + "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", + "dev": true, + "dependencies": { + "playwright": "1.40.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@prestashop-core/ui-testing": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.2.tgz", + "integrity": "sha512-v74KEfm8ZjWsjSwOdDixrnj/r633fLCKViyTYd4LXCmWPv4EaeS+vobgyqy/fxOAWoEr2ck/b4endrsGwicEmQ==", + "dev": true, + "dependencies": { + "@playwright/test": "^1.40.1", + "semver": "^7.5.4" + } + }, + "node_modules/@types/node": { + "version": "20.11.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", + "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/fsu": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fsu/-/fsu-1.1.1.tgz", + "integrity": "sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mochawesome-report-generator": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz", + "integrity": "sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "dateformat": "^4.5.1", + "escape-html": "^1.0.3", + "fs-extra": "^10.0.0", + "fsu": "^1.1.1", + "lodash.isfunction": "^3.0.9", + "opener": "^1.5.2", + "prop-types": "^15.7.2", + "tcomb": "^3.2.17", + "tcomb-validation": "^3.3.0", + "validator": "^13.6.0", + "yargs": "^17.2.1" + }, + "bin": { + "marge": "bin/cli.js" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/playwright": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", + "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", + "dev": true, + "dependencies": { + "playwright-core": "1.40.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", + "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", + "dev": true, + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/pwmochawesome": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pwmochawesome/-/pwmochawesome-1.1.1.tgz", + "integrity": "sha512-Gceyrsut9tD6fe8vpJoGcR9WNn92aOscTXnFgjmnQB6HbtXXtAhUCOU2HrKw0TWf/+cyD0FMYEeYSL8qvLVTeA==", + "dev": true, + "dependencies": { + "mochawesome-report-generator": "^6.2.0", + "strip-ansi": "^6.0.1", + "uuid": "^9.0.1" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tcomb": { + "version": "3.2.29", + "resolved": "https://registry.npmjs.org/tcomb/-/tcomb-3.2.29.tgz", + "integrity": "sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==", + "dev": true + }, + "node_modules/tcomb-validation": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tcomb-validation/-/tcomb-validation-3.4.1.tgz", + "integrity": "sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==", + "dev": true, + "dependencies": { + "tcomb": "^3.0.0" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + } + }, + "dependencies": { + "@playwright/test": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", + "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", + "dev": true, + "requires": { + "playwright": "1.40.1" + } + }, + "@prestashop-core/ui-testing": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.2.tgz", + "integrity": "sha512-v74KEfm8ZjWsjSwOdDixrnj/r633fLCKViyTYd4LXCmWPv4EaeS+vobgyqy/fxOAWoEr2ck/b4endrsGwicEmQ==", + "dev": true, + "requires": { + "@playwright/test": "^1.40.1", + "semver": "^7.5.4" + } + }, + "@types/node": { + "version": "20.11.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", + "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true + }, + "dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "fsu": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fsu/-/fsu-1.1.1.tgz", + "integrity": "sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mochawesome-report-generator": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz", + "integrity": "sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "dateformat": "^4.5.1", + "escape-html": "^1.0.3", + "fs-extra": "^10.0.0", + "fsu": "^1.1.1", + "lodash.isfunction": "^3.0.9", + "opener": "^1.5.2", + "prop-types": "^15.7.2", + "tcomb": "^3.2.17", + "tcomb-validation": "^3.3.0", + "validator": "^13.6.0", + "yargs": "^17.2.1" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true + }, + "playwright": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", + "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", + "dev": true, + "requires": { + "fsevents": "2.3.2", + "playwright-core": "1.40.1" + } + }, + "playwright-core": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", + "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", + "dev": true + }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "pwmochawesome": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pwmochawesome/-/pwmochawesome-1.1.1.tgz", + "integrity": "sha512-Gceyrsut9tD6fe8vpJoGcR9WNn92aOscTXnFgjmnQB6HbtXXtAhUCOU2HrKw0TWf/+cyD0FMYEeYSL8qvLVTeA==", + "dev": true, + "requires": { + "mochawesome-report-generator": "^6.2.0", + "strip-ansi": "^6.0.1", + "uuid": "^9.0.1" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tcomb": { + "version": "3.2.29", + "resolved": "https://registry.npmjs.org/tcomb/-/tcomb-3.2.29.tgz", + "integrity": "sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==", + "dev": true + }, + "tcomb-validation": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tcomb-validation/-/tcomb-validation-3.4.1.tgz", + "integrity": "sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==", + "dev": true, + "requires": { + "tcomb": "^3.0.0" + } + }, + "typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true + }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true + }, + "validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } +} diff --git a/tests/UI/package.json b/tests/UI/package.json new file mode 100644 index 00000000..fb8892de --- /dev/null +++ b/tests/UI/package.json @@ -0,0 +1,19 @@ +{ + "name": "blockwishlist_tests_ui", + "version": "1.0.0", + "description": "", + "scripts": {}, + "keywords": [], + "author": "", + "license": "MIT", + "devDependencies": { + "@playwright/test": "^1.40.1", + "@prestashop-core/ui-testing": "^0.0.2", + "@types/node": "^20.11.5", + "pwmochawesome": "^1.1.1", + "typescript": "^5.3.3" + }, + "dependencies": { + "dotenv": "^16.3.1" + } +} diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts new file mode 100644 index 00000000..72b17c9a --- /dev/null +++ b/tests/UI/playwright.config.ts @@ -0,0 +1,115 @@ +import { defineConfig, devices } from '@playwright/test'; +import { config } from 'dotenv'; +import path from 'path'; + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv +*/ +config(); + + +global.FO = { + URL: process.env.URL_FO || 'http://localhost/prestashop/', +}; + +/* +Linked to the issue #22581 + */ +global.URLHasPort = (global.FO.URL).match(/:\d+.+/) !== null; + +global.BO = { + URL: process.env.URL_BO || `${global.FO.URL}admin-dev/`, + EMAIL: process.env.LOGIN || 'demo@prestashop.com', + PASSWD: process.env.PASSWD || 'Correct Horse Battery Staple', + FIRSTNAME: process.env.FIRSTNAME || 'Marc', + LASTNAME: process.env.LASTNAME || 'Beier', +}; + +global.PSConfig = { + parametersFile: process.env.PS_PARAMETERS_FILE || path.resolve(__dirname, '../../../', 'app/config/parameters.php'), +}; + +global.INSTALL = { + URL: process.env.URL_INSTALL || `${global.FO.URL}install-dev/`, + LANGUAGE: process.env.INSTALL_LANGUAGE || 'en', + COUNTRY: process.env.INSTALL_COUNTRY || 'France', + ENABLE_SSL: process.env.ENABLE_SSL === 'true', + DB_SERVER: process.env.DB_SERVER || '127.0.0.1', + DB_NAME: process.env.DB_NAME || 'prestashopdb', + DB_USER: process.env.DB_USER || 'root', + DB_PASSWD: process.env.DB_PASSWD || '', + DB_PREFIX: process.env.DB_PREFIX || 'tst_', + SHOP_NAME: process.env.SHOP_NAME || 'PrestaShop', +}; + +global.BROWSER = { + name: process.env.BROWSER || 'chromium', + lang: process.env.BROWSER_LANG || 'en-GB', + width: process.env.BROWSER_WIDTH ? parseInt(process.env.BROWSER_WIDTH, 10) : 1680, + height: process.env.BROWSER_HEIGHT ? parseInt(process.env.BROWSER_HEIGHT, 10) : 900, + sandboxArgs: ['--no-sandbox', '--disable-setuid-sandbox'], + acceptDownloads: true, + config: { + headless: process.env.HEADLESS ? JSON.parse(process.env.HEADLESS) : true, + timeout: 0, + slowMo: process.env.SLOW_MO ? parseInt(process.env.SLOW_MO, 10) : 5, + }, + interceptErrors: process.env.INTERCEPT_ERRORS ? JSON.parse(process.env.INTERCEPT_ERRORS) : false, +}; + +global.GENERATE_FAILED_STEPS = process.env.GENERATE_FAILED_STEPS ? JSON.parse(process.env.GENERATE_FAILED_STEPS) : false; + +global.SCREENSHOT = { + FOLDER: process.env.SCREENSHOT_FOLDER || './screenshots', + AFTER_FAIL: process.env.TAKE_SCREENSHOT_AFTER_FAIL ? JSON.parse(process.env.TAKE_SCREENSHOT_AFTER_FAIL) : false, +}; + +global.maildevConfig = { + smtpPort: parseInt(process.env.SMTP_PORT ?? '1025', 10), + smtpServer: process.env.SMTP_SERVER || 'localhost', + silent: true, +}; + +global.keycloakConfig = { + keycloakExternalUrl: process.env.KEYCLOAK_URL_EXTERNAL || 'http://127.0.0.1:8003', + keycloakInternalUrl: process.env.KEYCLOAK_URL_INTERNAL || 'http://keycloak:8080', + keycloakAdminUser: process.env.KEYCLOAK_ADMIN_USER || 'admin', + keycloakAdminPass: process.env.KEYCLOAK_ADMIN_PASS || 'admin', + keycloakClientId: process.env.KEYCLOAK_CLIENT_ID || 'KEYCLOAK_CLIENT_ID', +}; + + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: './', + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + retries: 0, + workers: 1, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: [ + ['html', { outputFolder: 'reports', open: 'never' }], + [ './reporters/mochawesome.js', { outputJSON: true, reportDir: 'reports'} ] + ], + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://127.0.0.1:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + }, + ], +}); diff --git a/tests/UI/reporters/mochawesome.js b/tests/UI/reporters/mochawesome.js new file mode 100644 index 00000000..c8ec0467 --- /dev/null +++ b/tests/UI/reporters/mochawesome.js @@ -0,0 +1,3 @@ +const pwmochawesome = require('pwmochawesome'); + +module.exports = pwmochawesome; \ No newline at end of file diff --git a/tests/UI/tsconfig.json b/tests/UI/tsconfig.json new file mode 100644 index 00000000..50ec41e4 --- /dev/null +++ b/tests/UI/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "noImplicitThis": true, + "module": "es2022", + "target": "es2017", + "strict": true, + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "allowJs": true, + "downlevelIteration": true, + "baseUrl": "./", + "paths": { + }, + "typeRoots": [ + "node_modules/@types" + ], + "skipLibCheck": true, + "noEmit": true + }, + "include": ["campaigns/**/*"], + "exclude": ["node_modules"] + } \ No newline at end of file diff --git a/tests/UI/Button.spec.js b/tests/js/Button.spec.js similarity index 100% rename from tests/UI/Button.spec.js rename to tests/js/Button.spec.js diff --git a/tests/UI/Create.spec.js b/tests/js/Create.spec.js similarity index 100% rename from tests/UI/Create.spec.js rename to tests/js/Create.spec.js diff --git a/tests/UI/Delete.spec.js b/tests/js/Delete.spec.js similarity index 100% rename from tests/UI/Delete.spec.js rename to tests/js/Delete.spec.js diff --git a/tests/UI/List.spec.js b/tests/js/List.spec.js similarity index 100% rename from tests/UI/List.spec.js rename to tests/js/List.spec.js diff --git a/tests/UI/Login.spec.js b/tests/js/Login.spec.js similarity index 100% rename from tests/UI/Login.spec.js rename to tests/js/Login.spec.js diff --git a/tests/UI/Rename.spec.js b/tests/js/Rename.spec.js similarity index 100% rename from tests/UI/Rename.spec.js rename to tests/js/Rename.spec.js diff --git a/tests/UI/Toast.spec.js b/tests/js/Toast.spec.js similarity index 100% rename from tests/UI/Toast.spec.js rename to tests/js/Toast.spec.js diff --git a/tests/UI/setup.js b/tests/js/setup.js similarity index 100% rename from tests/UI/setup.js rename to tests/js/setup.js From a0f6a43ae3240de999e2d310471ed6e47bfbf07d Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 18 Jan 2024 17:40:35 +0100 Subject: [PATCH 08/73] Removed sample test --- tests/UI/campaigns/example.spec.ts | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 tests/UI/campaigns/example.spec.ts diff --git a/tests/UI/campaigns/example.spec.ts b/tests/UI/campaigns/example.spec.ts deleted file mode 100644 index 54a906a4..00000000 --- a/tests/UI/campaigns/example.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('has title', async ({ page }) => { - await page.goto('https://playwright.dev/'); - - // Expect a title "to contain" a substring. - await expect(page).toHaveTitle(/Playwright/); -}); - -test('get started link', async ({ page }) => { - await page.goto('https://playwright.dev/'); - - // Click the get started link. - await page.getByRole('link', { name: 'Get started' }).click(); - - // Expects page to have a heading with the name of Installation. - await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible(); -}); From 08befe5cac39d6a586cb710b18748f50ed85b687 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 18 Jan 2024 17:40:51 +0100 Subject: [PATCH 09/73] Open the HTML Report --- tests/UI/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index 72b17c9a..578bf531 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -93,7 +93,7 @@ export default defineConfig({ workers: 1, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ - ['html', { outputFolder: 'reports', open: 'never' }], + ['html', { outputFolder: 'reports' }], [ './reporters/mochawesome.js', { outputJSON: true, reportDir: 'reports'} ] ], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ From fb593f4208e4430a6cf08a18a6dfd8a27eace5e5 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 18 Jan 2024 17:41:02 +0100 Subject: [PATCH 10/73] Ignore the .env file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 65c4019e..44ba6ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,6 @@ node_modules .DS_Store ## UI Tests +/tests/UI/.env /tests/UI/node_modules/ /tests/UI/reports/ From eb101de1d4495d2a3a3f5496c2860a7523ec2dc3 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 18 Jan 2024 17:41:21 +0100 Subject: [PATCH 11/73] Test : Use step & try import unique --- .../02_statisticsTabSettings.spec.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts index 1bd7e132..49489b53 100644 --- a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts +++ b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts @@ -1,14 +1,14 @@ // Import utils -//import testContext from '@prestashop-core/ui-testing/dist/utils/testContext'; +import {testContext, dashboardPage, loginPage} from '@prestashop-core/ui-testing/dist'; // Import commonTests //import loginCommon from '@prestashop-core/ui-testing/dist/common/BO/loginBO'; // Import pages // Import BO pages -import dashboardPage from '@prestashop-core/ui-testing/dist/pages/BO/dashboard'; -import loginPage from '@prestashop-core/ui-testing/dist/pages/BO/login'; +//import dashboardPage from '@prestashop-core/ui-testing/dist/pages/BO/dashboard'; +//import loginPage from '@prestashop-core/ui-testing/dist/pages/BO/login'; /* import {moduleManager as moduleManagerPage} from '@pages/BO/modules/moduleManager'; import blockwishlistPage from '@pages/BO/modules/blockwishlist'; @@ -26,17 +26,19 @@ import { test, expect } from '@playwright/test'; const baseContext: string = 'modules_blockwishlist_configuration_statisticsTabSettings'; -test.describe('Wishlist module - Statistics tab settings', () => { - test('Check the Back Office: should login in BO', async ({ page }) => { +test('Wishlist module - Statistics tab settings', async ({ page }) => { + await test.step('should login in BO', async () => { + await testContent.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); + await loginPage.goTo(page, global.BO.URL); - await loginPage.successLogin(page, email, password); + await loginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD); const pageTitle = await dashboardPage.getPageTitle(page); expect(pageTitle).toContain(dashboardPage.pageTitle); }); - test('should go to \'Modules > Module Manager\' page', async ({ page }) => { - //await testContext.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPage', baseContext); + await test.step('should go to \'Modules > Module Manager\' page', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPage', baseContext); await dashboardPage.goToSubMenu( page, From fa890525df466438d3337684d8cc303d618cbe93 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Fri, 19 Jan 2024 13:24:54 +0100 Subject: [PATCH 12/73] Import unique --- .../02_statisticsTabSettings.spec.ts | 28 ++-- tests/UI/playwright.config.ts | 149 +++++++++--------- tests/UI/tsconfig.json | 5 +- tests/UI/types/global.d.ts | 27 ++++ 4 files changed, 121 insertions(+), 88 deletions(-) create mode 100644 tests/UI/types/global.d.ts diff --git a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts index 49489b53..b70122dd 100644 --- a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts +++ b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts @@ -1,14 +1,16 @@ - -// Import utils -import {testContext, dashboardPage, loginPage} from '@prestashop-core/ui-testing/dist'; +import { + // Import utils + testContext, + // Import BO pages + boDashboardPage, + boLoginPage, +} from '@prestashop-core/ui-testing'; // Import commonTests //import loginCommon from '@prestashop-core/ui-testing/dist/common/BO/loginBO'; // Import pages // Import BO pages -//import dashboardPage from '@prestashop-core/ui-testing/dist/pages/BO/dashboard'; -//import loginPage from '@prestashop-core/ui-testing/dist/pages/BO/login'; /* import {moduleManager as moduleManagerPage} from '@pages/BO/modules/moduleManager'; import blockwishlistPage from '@pages/BO/modules/blockwishlist'; @@ -28,22 +30,22 @@ const baseContext: string = 'modules_blockwishlist_configuration_statisticsTabSe test('Wishlist module - Statistics tab settings', async ({ page }) => { await test.step('should login in BO', async () => { - await testContent.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); + await testContext.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); - await loginPage.goTo(page, global.BO.URL); - await loginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD); + await boLoginPage.goTo(page, global.BO.URL); + await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD); - const pageTitle = await dashboardPage.getPageTitle(page); - expect(pageTitle).toContain(dashboardPage.pageTitle); + const pageTitle = await boDashboardPage.getPageTitle(page); + expect(pageTitle).toContain(boDashboardPage.pageTitle); }); await test.step('should go to \'Modules > Module Manager\' page', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPage', baseContext); - await dashboardPage.goToSubMenu( + await boDashboardPage.goToSubMenu( page, - dashboardPage.modulesParentLink, - dashboardPage.moduleManagerLink, + boDashboardPage.modulesParentLink, + boDashboardPage.moduleManagerLink, ); /* await moduleManagerPage.closeSfToolBar(page); diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index 578bf531..29e999c9 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -2,83 +2,87 @@ import { defineConfig, devices } from '@playwright/test'; import { config } from 'dotenv'; import path from 'path'; +function loadGlobal(): void { + global.FO = { + URL: process.env.URL_FO || 'http://localhost/prestashop/', + }; + + /* + Linked to the issue #22581 + */ + global.URLHasPort = (global.FO.URL).match(/:\d+.+/) !== null; + + global.BO = { + URL: process.env.URL_BO || `${global.FO.URL}admin-dev/`, + EMAIL: process.env.LOGIN || 'demo@prestashop.com', + PASSWD: process.env.PASSWD || 'Correct Horse Battery Staple', + FIRSTNAME: process.env.FIRSTNAME || 'Marc', + LASTNAME: process.env.LASTNAME || 'Beier', + }; + + global.PSConfig = { + parametersFile: process.env.PS_PARAMETERS_FILE || path.resolve(__dirname, '../../../', 'app/config/parameters.php'), + }; + + global.INSTALL = { + URL: process.env.URL_INSTALL || `${global.FO.URL}install-dev/`, + LANGUAGE: process.env.INSTALL_LANGUAGE || 'en', + COUNTRY: process.env.INSTALL_COUNTRY || 'France', + ENABLE_SSL: process.env.ENABLE_SSL === 'true', + DB_SERVER: process.env.DB_SERVER || '127.0.0.1', + DB_NAME: process.env.DB_NAME || 'prestashopdb', + DB_USER: process.env.DB_USER || 'root', + DB_PASSWD: process.env.DB_PASSWD || '', + DB_PREFIX: process.env.DB_PREFIX || 'tst_', + SHOP_NAME: process.env.SHOP_NAME || 'PrestaShop', + }; + + global.BROWSER = { + name: process.env.BROWSER || 'chromium', + lang: process.env.BROWSER_LANG || 'en-GB', + width: process.env.BROWSER_WIDTH ? parseInt(process.env.BROWSER_WIDTH, 10) : 1680, + height: process.env.BROWSER_HEIGHT ? parseInt(process.env.BROWSER_HEIGHT, 10) : 900, + sandboxArgs: ['--no-sandbox', '--disable-setuid-sandbox'], + acceptDownloads: true, + config: { + headless: process.env.HEADLESS ? JSON.parse(process.env.HEADLESS) : true, + timeout: 0, + slowMo: process.env.SLOW_MO ? parseInt(process.env.SLOW_MO, 10) : 5, + }, + interceptErrors: process.env.INTERCEPT_ERRORS ? JSON.parse(process.env.INTERCEPT_ERRORS) : false, + }; + + global.GENERATE_FAILED_STEPS = process.env.GENERATE_FAILED_STEPS ? JSON.parse(process.env.GENERATE_FAILED_STEPS) : false; + + global.SCREENSHOT = { + FOLDER: process.env.SCREENSHOT_FOLDER || './screenshots', + AFTER_FAIL: process.env.TAKE_SCREENSHOT_AFTER_FAIL ? JSON.parse(process.env.TAKE_SCREENSHOT_AFTER_FAIL) : false, + }; + + global.maildevConfig = { + smtpPort: parseInt(process.env.SMTP_PORT ?? '1025', 10), + smtpServer: process.env.SMTP_SERVER || 'localhost', + silent: true, + }; + + global.keycloakConfig = { + keycloakExternalUrl: process.env.KEYCLOAK_URL_EXTERNAL || 'http://127.0.0.1:8003', + keycloakInternalUrl: process.env.KEYCLOAK_URL_INTERNAL || 'http://keycloak:8080', + keycloakAdminUser: process.env.KEYCLOAK_ADMIN_USER || 'admin', + keycloakAdminPass: process.env.KEYCLOAK_ADMIN_PASS || 'admin', + keycloakClientId: process.env.KEYCLOAK_CLIENT_ID || 'KEYCLOAK_CLIENT_ID', + }; +} + /** * Read environment variables from file. * https://github.com/motdotla/dotenv -*/ + */ config(); - - -global.FO = { - URL: process.env.URL_FO || 'http://localhost/prestashop/', -}; - -/* -Linked to the issue #22581 +/** + * Load global data from environment variables */ -global.URLHasPort = (global.FO.URL).match(/:\d+.+/) !== null; - -global.BO = { - URL: process.env.URL_BO || `${global.FO.URL}admin-dev/`, - EMAIL: process.env.LOGIN || 'demo@prestashop.com', - PASSWD: process.env.PASSWD || 'Correct Horse Battery Staple', - FIRSTNAME: process.env.FIRSTNAME || 'Marc', - LASTNAME: process.env.LASTNAME || 'Beier', -}; - -global.PSConfig = { - parametersFile: process.env.PS_PARAMETERS_FILE || path.resolve(__dirname, '../../../', 'app/config/parameters.php'), -}; - -global.INSTALL = { - URL: process.env.URL_INSTALL || `${global.FO.URL}install-dev/`, - LANGUAGE: process.env.INSTALL_LANGUAGE || 'en', - COUNTRY: process.env.INSTALL_COUNTRY || 'France', - ENABLE_SSL: process.env.ENABLE_SSL === 'true', - DB_SERVER: process.env.DB_SERVER || '127.0.0.1', - DB_NAME: process.env.DB_NAME || 'prestashopdb', - DB_USER: process.env.DB_USER || 'root', - DB_PASSWD: process.env.DB_PASSWD || '', - DB_PREFIX: process.env.DB_PREFIX || 'tst_', - SHOP_NAME: process.env.SHOP_NAME || 'PrestaShop', -}; - -global.BROWSER = { - name: process.env.BROWSER || 'chromium', - lang: process.env.BROWSER_LANG || 'en-GB', - width: process.env.BROWSER_WIDTH ? parseInt(process.env.BROWSER_WIDTH, 10) : 1680, - height: process.env.BROWSER_HEIGHT ? parseInt(process.env.BROWSER_HEIGHT, 10) : 900, - sandboxArgs: ['--no-sandbox', '--disable-setuid-sandbox'], - acceptDownloads: true, - config: { - headless: process.env.HEADLESS ? JSON.parse(process.env.HEADLESS) : true, - timeout: 0, - slowMo: process.env.SLOW_MO ? parseInt(process.env.SLOW_MO, 10) : 5, - }, - interceptErrors: process.env.INTERCEPT_ERRORS ? JSON.parse(process.env.INTERCEPT_ERRORS) : false, -}; - -global.GENERATE_FAILED_STEPS = process.env.GENERATE_FAILED_STEPS ? JSON.parse(process.env.GENERATE_FAILED_STEPS) : false; - -global.SCREENSHOT = { - FOLDER: process.env.SCREENSHOT_FOLDER || './screenshots', - AFTER_FAIL: process.env.TAKE_SCREENSHOT_AFTER_FAIL ? JSON.parse(process.env.TAKE_SCREENSHOT_AFTER_FAIL) : false, -}; - -global.maildevConfig = { - smtpPort: parseInt(process.env.SMTP_PORT ?? '1025', 10), - smtpServer: process.env.SMTP_SERVER || 'localhost', - silent: true, -}; - -global.keycloakConfig = { - keycloakExternalUrl: process.env.KEYCLOAK_URL_EXTERNAL || 'http://127.0.0.1:8003', - keycloakInternalUrl: process.env.KEYCLOAK_URL_INTERNAL || 'http://keycloak:8080', - keycloakAdminUser: process.env.KEYCLOAK_ADMIN_USER || 'admin', - keycloakAdminPass: process.env.KEYCLOAK_ADMIN_PASS || 'admin', - keycloakClientId: process.env.KEYCLOAK_CLIENT_ID || 'KEYCLOAK_CLIENT_ID', -}; - +loadGlobal(); /** * See https://playwright.dev/docs/test-configuration. @@ -93,6 +97,7 @@ export default defineConfig({ workers: 1, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ + ['json', { outputFolder: 'reports' }], ['html', { outputFolder: 'reports' }], [ './reporters/mochawesome.js', { outputJSON: true, reportDir: 'reports'} ] ], diff --git a/tests/UI/tsconfig.json b/tests/UI/tsconfig.json index 50ec41e4..6f4c3f42 100644 --- a/tests/UI/tsconfig.json +++ b/tests/UI/tsconfig.json @@ -12,14 +12,13 @@ "allowJs": true, "downlevelIteration": true, "baseUrl": "./", - "paths": { - }, + "paths": {}, "typeRoots": [ "node_modules/@types" ], "skipLibCheck": true, "noEmit": true }, - "include": ["campaigns/**/*"], + "include": ["types/global.d.ts", "campaigns/**/*"], "exclude": ["node_modules"] } \ No newline at end of file diff --git a/tests/UI/types/global.d.ts b/tests/UI/types/global.d.ts new file mode 100644 index 00000000..2ea76cdb --- /dev/null +++ b/tests/UI/types/global.d.ts @@ -0,0 +1,27 @@ +import type { + GlobalInstall, + GlobalFO, + GlobalBO, + GlobalBrowserConfig, + GlobalPSConfig, + GlobalBrowserErrors, + GlobalScreenshot, + GlobalMaildevConfig, + GlobalKeycloakConfig +} from '@prestashop-core/ui-testing'; + +declare global { + var INSTALL: GlobalInstall; + var URLHasPort: boolean; + var FO: GlobalFO; + var BO: GlobalBO; + var PSConfig: GlobalPSConfig; + var BROWSER: GlobalBrowserConfig; + var GENERATE_FAILED_STEPS: any; + var SCREENSHOT: GlobalScreenshot; + var maildevConfig: GlobalMaildevConfig; + var keycloakConfig: GlobalKeycloakConfig; + var browserErrors: GlobalBrowserErrors; +} + +export {}; \ No newline at end of file From e5b82af14e974caede870b4061b233cada674f87 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 22 Jan 2024 10:33:59 +0100 Subject: [PATCH 13/73] Bump dependency @prestashop-core/ui-testing to 0.0.3 --- .../02_statisticsTabSettings.spec.ts | 194 +++++++++--------- tests/UI/package-lock.json | 38 +++- tests/UI/package.json | 2 +- 3 files changed, 124 insertions(+), 110 deletions(-) diff --git a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts index b70122dd..d1d72280 100644 --- a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts +++ b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts @@ -4,31 +4,24 @@ import { // Import BO pages boDashboardPage, boLoginPage, + boModuleManagerPage, + // Import FO pages + foCategoryPage, + foHomePage, + foLoginPage, + // Import modules + modBlockwishlistBoMain, + modBlockwishlistBoStatistics, + // Import data + dataCustomers, + dataModules, } from '@prestashop-core/ui-testing'; -// Import commonTests -//import loginCommon from '@prestashop-core/ui-testing/dist/common/BO/loginBO'; - -// Import pages -// Import BO pages -/* -import {moduleManager as moduleManagerPage} from '@pages/BO/modules/moduleManager'; -import blockwishlistPage from '@pages/BO/modules/blockwishlist'; -import blockwishlistStatisticsPage from '@pages/BO/modules/blockwishlist/statistics'; -// Import FO pages -import categoryPage from '@pages/FO/category'; -import {homePage} from '@pages/FO/home'; -import {loginPage as foLoginPage} from '@pages/FO/login'; - -// Import data -import Customers from '@data/demo/customers'; -import Modules from '@data/demo/modules';*/ - import { test, expect } from '@playwright/test'; const baseContext: string = 'modules_blockwishlist_configuration_statisticsTabSettings'; -test('Wishlist module - Statistics tab settings', async ({ page }) => { +test('Wishlist module - Statistics tab settings', async ({ page, context }) => { await test.step('should login in BO', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); @@ -47,127 +40,124 @@ test('Wishlist module - Statistics tab settings', async ({ page }) => { boDashboardPage.modulesParentLink, boDashboardPage.moduleManagerLink, ); - /* - await moduleManagerPage.closeSfToolBar(page); + await boModuleManagerPage.closeSfToolBar(page); - const pageTitle = await moduleManagerPage.getPageTitle(page); - expect(pageTitle).to.contains(moduleManagerPage.pageTitle);*/ + const pageTitle = await boModuleManagerPage.getPageTitle(page); + expect(pageTitle).toContain(boModuleManagerPage.pageTitle); }); -/* - test(`should search the module ${Modules.blockwishlist.name}`, async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'searchModule', baseContext); - const isModuleVisible = await moduleManagerPage.searchModule(page, Modules.blockwishlist); - expect(isModuleVisible).to.eq(true); - }); + await test.step(`should search the module ${dataModules.blockwishlist.name}`, async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'searchModule', baseContext); - test(`should go to the configuration page of the module '${Modules.blockwishlist.name}'`, async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'goToConfigurationPage', baseContext); + const isModuleVisible = await boModuleManagerPage.searchModule(page, dataModules.blockwishlist); + expect(isModuleVisible).toEqual(true); + }); - await moduleManagerPage.goToConfigurationPage(page, Modules.blockwishlist.tag); + await test.step(`should go to the configuration page of the module '${dataModules.blockwishlist.name}'`, async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToConfigurationPage', baseContext); - const pageTitle = await blockwishlistPage.getPageTitle(page); - expect(pageTitle).to.eq(blockwishlistPage.pageTitle); + await boModuleManagerPage.goToConfigurationPage(page, dataModules.blockwishlist.tag); - const isConfigurationTabActive = await blockwishlistPage.isTabActive(page, 'Configuration'); - expect(isConfigurationTabActive).to.eq(true); + const pageTitle = await modBlockwishlistBoMain.getPageTitle(page); + expect(pageTitle).toEqual(modBlockwishlistBoMain.pageTitle); - const isStatisticsTabActive = await blockwishlistPage.isTabActive(page, 'Statistics'); - expect(isStatisticsTabActive).to.eq(false); - }); + const isConfigurationTabActive = await modBlockwishlistBoMain.isTabActive(page, 'Configuration'); + expect(isConfigurationTabActive).toEqual(true); - test('should go on Statistics Tab', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'goToStatisticsTab', baseContext); + const isStatisticsTabActive = await modBlockwishlistBoMain.isTabActive(page, 'Statistics'); + expect(isStatisticsTabActive).toEqual(false); + }); + + await test.step('should go on Statistics Tab', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToStatisticsTab', baseContext); - await blockwishlistPage.goToStatisticsTab(page); + await modBlockwishlistBoMain.goToStatisticsTab(page); - const pageTitle = await blockwishlistStatisticsPage.getPageTitle(page); - expect(pageTitle).to.eq(blockwishlistStatisticsPage.pageTitle); + const pageTitle = await modBlockwishlistBoStatistics.getPageTitle(page); + expect(pageTitle).toEqual(modBlockwishlistBoStatistics.pageTitle); - const noRecordsFoundText = await blockwishlistStatisticsPage.getTextForEmptyTable(page); - expect(noRecordsFoundText).to.contains('warning No records found'); - }); + const noRecordsFoundText = await modBlockwishlistBoStatistics.getTextForEmptyTable(page); + expect(noRecordsFoundText).toContain('warning No records found'); }); - describe('Go to the FO and add to favorites some products', async () => { - test('should go to the FO', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'goToFO', baseContext); - page = await blockwishlistStatisticsPage.viewMyShop(page); - await homePage.changeLanguage(page, 'en'); + await test.step('should go to the FO', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToFO', baseContext); - const isHomePage = await homePage.isHomePage(page); - expect(isHomePage).to.eq(true); - }); + page = await modBlockwishlistBoStatistics.viewMyShop(page); + await foHomePage.changeLanguage(page, 'en'); - test('should go to login page', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'goToLoginPage', baseContext); + const isHomePage = await foHomePage.isHomePage(page); + expect(isHomePage).toEqual(true); + }); - await homePage.goToLoginPage(page); + await test.step('should go to login page', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToLoginPage', baseContext); - const pageTitle = await foLoginPage.getPageTitle(page); - expect(pageTitle, 'Fail to open FO login page').to.contains(foLoginPage.pageTitle); - }); + await foHomePage.goToLoginPage(page); - test('should sign in with default customer', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'sighInFo', baseContext); + const pageTitle = await foLoginPage.getPageTitle(page); + expect(pageTitle, 'Fail to open FO login page').toContain(foLoginPage.pageTitle); + }); - await foLoginPage.customerLogin(page, Customers.johnDoe); + await test.step('should sign in with default customer', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'sighInFo', baseContext); - const isCustomerConnected = await foLoginPage.isCustomerConnected(page); - expect(isCustomerConnected, 'Customer is not connected').to.eq(true); - }); + await foLoginPage.customerLogin(page, dataCustomers.johnDoe); - test('should go to all products page', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'goToAllProducts', baseContext); + const isCustomerConnected = await foLoginPage.isCustomerConnected(page); + expect(isCustomerConnected, 'Customer is not connected').toEqual(true); + }); + + await test.step('should go to all products page', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToAllProducts', baseContext); - await homePage.goToAllProductsPage(page); + await foHomePage.goToAllProductsPage(page); - const isCategoryPageVisible = await categoryPage.isCategoryPage(page); - expect(isCategoryPageVisible).to.eq(true); - }); + const isCategoryPageVisible = await foCategoryPage.isCategoryPage(page); + expect(isCategoryPageVisible).toEqual(true); + }); for (let idxProduct: number = 1; idxProduct <= 3; idxProduct++) { // eslint-disable-next-line no-loop-func - test(`should add product #${idxProduct} to wishlist`, async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', `addToFavorite${idxProduct}`, baseContext); + await test.step(`should add product #${idxProduct} to wishlist`, async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', `addToFavorite${idxProduct}`, baseContext); - const textResult = await categoryPage.addToWishList(page, idxProduct); - expect(textResult).to.be.eq(categoryPage.messageAddedToWishlist); + const textResult = await foCategoryPage.addToWishList(page, idxProduct); + expect(textResult).toEqual(foCategoryPage.messageAddedToWishlist); - const isAddedToWishlist = await categoryPage.isAddedToWishlist(page, idxProduct); - expect(isAddedToWishlist).to.eq(true); + const isAddedToWishlist = await foCategoryPage.isAddedToWishlist(page, idxProduct); + expect(isAddedToWishlist).toEqual(true); }); } - test('should logout', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'foLogout', baseContext); + await test.step('should logout', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'foLogout', baseContext); - await categoryPage.logout(page); + await foCategoryPage.logout(page); - const isCustomerConnected = await homePage.isCustomerConnected(page); - expect(isCustomerConnected).to.eq(false); - }); + const isCustomerConnected = await foHomePage.isCustomerConnected(page); + expect(isCustomerConnected).toEqual(false); }); - describe('Return to BO and check statistics', async () => { - test('should go to BO', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'goToBoBack', baseContext); + + await test.step('should go to BO', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'goToBoBack', baseContext); - page = await homePage.closePage(browserContext, page, 0); + page = await foHomePage.closePage(context, page, 0); - const pageTitle = await blockwishlistStatisticsPage.getPageTitle(page); - expect(pageTitle).to.contains(blockwishlistStatisticsPage.pageTitle); - }); - // @todo : https://github.com/PrestaShop/PrestaShop/issues/33374 - test('should click on the refresh button', async ({ page }) => { - await testContext.addContextItem(this, 'testIdentifier', 'clickOnRefreshButton', baseContext); + const pageTitle = await modBlockwishlistBoStatistics.getPageTitle(page); + expect(pageTitle).toContain(modBlockwishlistBoStatistics.pageTitle); + }); + + // @todo : https://github.com/PrestaShop/PrestaShop/issues/33374 + await test.step('should click on the refresh button', async () => { + await testContext.addContextItem(test.info(), 'testIdentifier', 'clickOnRefreshButton', baseContext); - test.skip(); + test.skip(true, 'https://github.com/PrestaShop/PrestaShop/issues/33374'); - await blockwishlistStatisticsPage.refreshStatistics(page); + await modBlockwishlistBoStatistics.refreshStatistics(page); - // Check statistics - const pageTitle = await blockwishlistStatisticsPage.getPageTitle(page); - expect(pageTitle).to.contains(blockwishlistStatisticsPage.pageTitle); - }); - });*/ + // Check statistics + const pageTitle = await modBlockwishlistBoStatistics.getPageTitle(page); + expect(pageTitle).toContain(modBlockwishlistBoStatistics.pageTitle); + }); }); diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 4620d167..97092d81 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -13,12 +13,28 @@ }, "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.2", + "@prestashop-core/ui-testing": "^0.0.3", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" } }, + "node_modules/@faker-js/faker": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.3.1.tgz", + "integrity": "sha512-FdgpFxY6V6rLZE9mmIBb9hM0xpfvQOSNOLnzolzKwsE1DH+gC7lEKV1p1IbR0lAYyvYd5a4u3qWJzowUkw1bIw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" + } + }, "node_modules/@playwright/test": { "version": "1.40.1", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", @@ -35,11 +51,12 @@ } }, "node_modules/@prestashop-core/ui-testing": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.2.tgz", - "integrity": "sha512-v74KEfm8ZjWsjSwOdDixrnj/r633fLCKViyTYd4LXCmWPv4EaeS+vobgyqy/fxOAWoEr2ck/b4endrsGwicEmQ==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.3.tgz", + "integrity": "sha512-qZIGkD7cuNvLMvRyLGhLxSgh4riCn+wL1fF0dC+d+Vr0G0pbWGEDpIv1gWhvzj1f2BFyadO1vvVxUaDIwWDbAQ==", "dev": true, "dependencies": { + "@faker-js/faker": "^8.3.1", "@playwright/test": "^1.40.1", "semver": "^7.5.4" } @@ -568,6 +585,12 @@ } }, "dependencies": { + "@faker-js/faker": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.3.1.tgz", + "integrity": "sha512-FdgpFxY6V6rLZE9mmIBb9hM0xpfvQOSNOLnzolzKwsE1DH+gC7lEKV1p1IbR0lAYyvYd5a4u3qWJzowUkw1bIw==", + "dev": true + }, "@playwright/test": { "version": "1.40.1", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", @@ -578,11 +601,12 @@ } }, "@prestashop-core/ui-testing": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.2.tgz", - "integrity": "sha512-v74KEfm8ZjWsjSwOdDixrnj/r633fLCKViyTYd4LXCmWPv4EaeS+vobgyqy/fxOAWoEr2ck/b4endrsGwicEmQ==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.3.tgz", + "integrity": "sha512-qZIGkD7cuNvLMvRyLGhLxSgh4riCn+wL1fF0dC+d+Vr0G0pbWGEDpIv1gWhvzj1f2BFyadO1vvVxUaDIwWDbAQ==", "dev": true, "requires": { + "@faker-js/faker": "^8.3.1", "@playwright/test": "^1.40.1", "semver": "^7.5.4" } diff --git a/tests/UI/package.json b/tests/UI/package.json index fb8892de..77a7bb26 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -8,7 +8,7 @@ "license": "MIT", "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.2", + "@prestashop-core/ui-testing": "^0.0.3", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" From 825df303740ca75f1a889733e48f8dca827471a0 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 22 Jan 2024 10:39:44 +0100 Subject: [PATCH 14/73] Github Action : Continue if error --- .github/workflows/ui-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index ab2017fb..867dafa2 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -5,6 +5,7 @@ jobs: name: UI Tests runs-on: ubuntu-latest strategy: + fail-fast: false matrix: ps-version: - '8.0.5' From 3029fe000a6a9bf6add4cb8f7b4828e7b6e72b25 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 22 Jan 2024 11:54:32 +0100 Subject: [PATCH 15/73] Fixed CI --- .github/workflows/ui-test.yml | 7 +++++-- tests/UI/docker-compose.yml | 11 ++++++----- tests/UI/playwright.config.ts | 14 +++----------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 867dafa2..e435b15d 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -25,7 +25,10 @@ jobs: run: npm install && npm run build - name: Start containers - run: docker-compose -f "docker-compose.yml" up -d --build + run: | + docker-compose -f "docker-compose.yml" up -d --build + while ! nc -z localhost 8000; do sleep 1; done; + working-directory: tests/UI/ - name: Install dependencies run: npm ci @@ -43,5 +46,5 @@ jobs: if: always() with: name: playwright-report - path: playwright-report/ + path: tests/UI/reports/ retention-days: 30 \ No newline at end of file diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index 5dc6f371..a9549f84 100644 --- a/tests/UI/docker-compose.yml +++ b/tests/UI/docker-compose.yml @@ -1,12 +1,14 @@ +version: '3.7' + services: prestashop: image: prestashop/prestashop-flashlight:${PS_VERSION} container_name: prestashop - depends_on: - mysql: - condition: service_healthy + depends_on: + - mysql environment: - DEBUG_MODE=true + - PS_DOMAIN=localhost:8000 volumes: - type: bind # Local Path @@ -15,7 +17,6 @@ services: target: /var/www/html/modules/blockwishlist ports: - 8000:80 - mysql: image: mariadb:lts container_name: prestashop-mysql @@ -38,4 +39,4 @@ services: - MYSQL_PASSWORD=prestashop - MYSQL_ROOT_PASSWORD=prestashop - MYSQL_PORT=3306 - - MYSQL_DATABASE=prestashop \ No newline at end of file + - MYSQL_DATABASE=prestashop diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index 29e999c9..d523cd33 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -4,7 +4,7 @@ import path from 'path'; function loadGlobal(): void { global.FO = { - URL: process.env.URL_FO || 'http://localhost/prestashop/', + URL: process.env.URL_FO || 'http://localhost:8000/', }; /* @@ -14,8 +14,8 @@ function loadGlobal(): void { global.BO = { URL: process.env.URL_BO || `${global.FO.URL}admin-dev/`, - EMAIL: process.env.LOGIN || 'demo@prestashop.com', - PASSWD: process.env.PASSWD || 'Correct Horse Battery Staple', + EMAIL: process.env.LOGIN || 'admin@prestashop.com', + PASSWD: process.env.PASSWD || 'prestashop', FIRSTNAME: process.env.FIRSTNAME || 'Marc', LASTNAME: process.env.LASTNAME || 'Beier', }; @@ -64,14 +64,6 @@ function loadGlobal(): void { smtpServer: process.env.SMTP_SERVER || 'localhost', silent: true, }; - - global.keycloakConfig = { - keycloakExternalUrl: process.env.KEYCLOAK_URL_EXTERNAL || 'http://127.0.0.1:8003', - keycloakInternalUrl: process.env.KEYCLOAK_URL_INTERNAL || 'http://keycloak:8080', - keycloakAdminUser: process.env.KEYCLOAK_ADMIN_USER || 'admin', - keycloakAdminPass: process.env.KEYCLOAK_ADMIN_PASS || 'admin', - keycloakClientId: process.env.KEYCLOAK_CLIENT_ID || 'KEYCLOAK_CLIENT_ID', - }; } /** From 67592e3a00461ad4dcb001172818b707e7c58355 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 22 Jan 2024 15:06:20 +0100 Subject: [PATCH 16/73] Bump dependency @prestashop-core/ui-testing to 0.0.4 --- .github/workflows/ui-test.yml | 2 +- tests/UI/package-lock.json | 14 +++++++------- tests/UI/package.json | 2 +- tests/UI/playwright.config.ts | 13 ++++++++++++- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index e435b15d..bb3fe052 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -35,7 +35,7 @@ jobs: working-directory: tests/UI/ - name: Install Playwright Browsers - run: npx playwright install --with-deps + run: npx playwright install chromium --with-deps working-directory: tests/UI/ - name: Run Playwright tests diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 97092d81..5fe3f870 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.3", + "@prestashop-core/ui-testing": "^0.0.4", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" @@ -51,9 +51,9 @@ } }, "node_modules/@prestashop-core/ui-testing": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.3.tgz", - "integrity": "sha512-qZIGkD7cuNvLMvRyLGhLxSgh4riCn+wL1fF0dC+d+Vr0G0pbWGEDpIv1gWhvzj1f2BFyadO1vvVxUaDIwWDbAQ==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.4.tgz", + "integrity": "sha512-L/zPCh9sNOJ1hQqqoOYhY0YE8Z+sk54gWJjwAsppFjKyuRRYhIRdNd62v0RvYHJnXcqjPckX784JyRN+krC6GQ==", "dev": true, "dependencies": { "@faker-js/faker": "^8.3.1", @@ -601,9 +601,9 @@ } }, "@prestashop-core/ui-testing": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.3.tgz", - "integrity": "sha512-qZIGkD7cuNvLMvRyLGhLxSgh4riCn+wL1fF0dC+d+Vr0G0pbWGEDpIv1gWhvzj1f2BFyadO1vvVxUaDIwWDbAQ==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.4.tgz", + "integrity": "sha512-L/zPCh9sNOJ1hQqqoOYhY0YE8Z+sk54gWJjwAsppFjKyuRRYhIRdNd62v0RvYHJnXcqjPckX784JyRN+krC6GQ==", "dev": true, "requires": { "@faker-js/faker": "^8.3.1", diff --git a/tests/UI/package.json b/tests/UI/package.json index 77a7bb26..1961a5af 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -8,7 +8,7 @@ "license": "MIT", "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.3", + "@prestashop-core/ui-testing": "^0.0.4", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index d523cd33..27a808f4 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -100,13 +100,24 @@ export default defineConfig({ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', + + /* Capture screenshot after each test failure */ + screenshot: 'only-on-failure', }, /* Configure projects for major browsers */ projects: [ { name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + use: { + ...devices['Desktop Chrome'], + contextOptions: { + screen: { + width: 1680, + height: 900 + } + }, + }, }, ], }); From 9e997a8443aa58c388cd51a8248bd39eb0debe4d Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 24 Jan 2024 11:13:21 +0100 Subject: [PATCH 17/73] Use prestashop/prestashop image --- .github/workflows/ui-test.yml | 2 +- tests/UI/docker-compose.yml | 19 +++++++++++++++---- tests/UI/playwright.config.ts | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index bb3fe052..95329fc1 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -27,7 +27,7 @@ jobs: - name: Start containers run: | docker-compose -f "docker-compose.yml" up -d --build - while ! nc -z localhost 8000; do sleep 1; done; + while ! nc -z localhost 80; do sleep 1; done; working-directory: tests/UI/ - name: Install dependencies diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index a9549f84..ca26440e 100644 --- a/tests/UI/docker-compose.yml +++ b/tests/UI/docker-compose.yml @@ -2,13 +2,24 @@ version: '3.7' services: prestashop: - image: prestashop/prestashop-flashlight:${PS_VERSION} + image: prestashop/prestashop:${PS_VERSION}-apache container_name: prestashop depends_on: - mysql environment: - - DEBUG_MODE=true - - PS_DOMAIN=localhost:8000 + - PS_DEV_MODE=1 + - PS_DOMAIN=localhost + - PS_LANGUAGE=en + - PS_COUNTRY=fr + - PS_INSTALL_AUTO=1 + - PS_FOLDER_ADMIN=admin-dev + - PS_FOLDER_INSTALL=install-dev + - ADMIN_MAIL=admin@prestashop.com + - ADMIN_PASSWD=prestashop + - DB_SERVER=mysql + - DB_USER=prestashop + - DB_PASSWD=prestashop + - DB_NAME=prestashop volumes: - type: bind # Local Path @@ -16,7 +27,7 @@ services: # Mount Path target: /var/www/html/modules/blockwishlist ports: - - 8000:80 + - 80:80 mysql: image: mariadb:lts container_name: prestashop-mysql diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index 27a808f4..24f286ad 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -4,7 +4,7 @@ import path from 'path'; function loadGlobal(): void { global.FO = { - URL: process.env.URL_FO || 'http://localhost:8000/', + URL: process.env.URL_FO || 'http://localhost/', }; /* From 0153840809d1216003f954d37caf22a25cadf332 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 24 Jan 2024 13:15:50 +0100 Subject: [PATCH 18/73] Bump dependency @prestashop-core/ui-testing to 0.0.5 --- tests/UI/package-lock.json | 14 +++++++------- tests/UI/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 5fe3f870..94042d02 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.4", + "@prestashop-core/ui-testing": "^0.0.5", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" @@ -51,9 +51,9 @@ } }, "node_modules/@prestashop-core/ui-testing": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.4.tgz", - "integrity": "sha512-L/zPCh9sNOJ1hQqqoOYhY0YE8Z+sk54gWJjwAsppFjKyuRRYhIRdNd62v0RvYHJnXcqjPckX784JyRN+krC6GQ==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.5.tgz", + "integrity": "sha512-7VLuCZNrqNiGZJncXYDYU1LpfFJg0irgi+5OFnXkrM3nGhTnrjSZWb9m/vSFjFNEYP+ewT2zl6SwFG6yMyM49g==", "dev": true, "dependencies": { "@faker-js/faker": "^8.3.1", @@ -601,9 +601,9 @@ } }, "@prestashop-core/ui-testing": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.4.tgz", - "integrity": "sha512-L/zPCh9sNOJ1hQqqoOYhY0YE8Z+sk54gWJjwAsppFjKyuRRYhIRdNd62v0RvYHJnXcqjPckX784JyRN+krC6GQ==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.5.tgz", + "integrity": "sha512-7VLuCZNrqNiGZJncXYDYU1LpfFJg0irgi+5OFnXkrM3nGhTnrjSZWb9m/vSFjFNEYP+ewT2zl6SwFG6yMyM49g==", "dev": true, "requires": { "@faker-js/faker": "^8.3.1", diff --git a/tests/UI/package.json b/tests/UI/package.json index 1961a5af..9a4c827b 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -8,7 +8,7 @@ "license": "MIT", "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.4", + "@prestashop-core/ui-testing": "^0.0.5", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" From 52441e297d8a9b39510bf4d777bce78ae14c7ad0 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 24 Jan 2024 13:32:39 +0100 Subject: [PATCH 19/73] Bump dependency @prestashop-core/ui-testing to 0.0.6 --- .../02_statisticsTabSettings.spec.ts | 44 ++++++++++++------- tests/UI/package-lock.json | 14 +++--- tests/UI/package.json | 2 +- tests/UI/playwright.config.ts | 4 +- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts index d1d72280..1cb9d798 100644 --- a/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts +++ b/tests/UI/campaigns/02_configuration/02_statisticsTabSettings.spec.ts @@ -17,12 +17,23 @@ import { dataModules, } from '@prestashop-core/ui-testing'; -import { test, expect } from '@playwright/test'; +import { test, expect, Page, BrowserContext } from '@playwright/test'; const baseContext: string = 'modules_blockwishlist_configuration_statisticsTabSettings'; -test('Wishlist module - Statistics tab settings', async ({ page, context }) => { - await test.step('should login in BO', async () => { +test.describe('Wishlist module - Statistics tab settings', () => { + let browserContext: BrowserContext; + let page: Page; + + test.beforeAll(async ({ browser }) => { + browserContext = await browser.newContext(); + page = await browserContext.newPage(); + }); + test.afterAll(async () => { + await page.close(); + }); + + test('should login in BO', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); await boLoginPage.goTo(page, global.BO.URL); @@ -32,7 +43,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(pageTitle).toContain(boDashboardPage.pageTitle); }); - await test.step('should go to \'Modules > Module Manager\' page', async () => { + test('should go to \'Modules > Module Manager\' page', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPage', baseContext); await boDashboardPage.goToSubMenu( @@ -46,14 +57,15 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(pageTitle).toContain(boModuleManagerPage.pageTitle); }); - await test.step(`should search the module ${dataModules.blockwishlist.name}`, async () => { + + test(`should search the module ${dataModules.blockwishlist.name}`, async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'searchModule', baseContext); const isModuleVisible = await boModuleManagerPage.searchModule(page, dataModules.blockwishlist); expect(isModuleVisible).toEqual(true); }); - await test.step(`should go to the configuration page of the module '${dataModules.blockwishlist.name}'`, async () => { + test(`should go to the configuration page of the module '${dataModules.blockwishlist.name}'`, async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToConfigurationPage', baseContext); await boModuleManagerPage.goToConfigurationPage(page, dataModules.blockwishlist.tag); @@ -68,7 +80,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(isStatisticsTabActive).toEqual(false); }); - await test.step('should go on Statistics Tab', async () => { + test('should go on Statistics Tab', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToStatisticsTab', baseContext); await modBlockwishlistBoMain.goToStatisticsTab(page); @@ -80,7 +92,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(noRecordsFoundText).toContain('warning No records found'); }); - await test.step('should go to the FO', async () => { + test('should go to the FO', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToFO', baseContext); page = await modBlockwishlistBoStatistics.viewMyShop(page); @@ -90,7 +102,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(isHomePage).toEqual(true); }); - await test.step('should go to login page', async () => { + test('should go to login page', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToLoginPage', baseContext); await foHomePage.goToLoginPage(page); @@ -99,7 +111,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(pageTitle, 'Fail to open FO login page').toContain(foLoginPage.pageTitle); }); - await test.step('should sign in with default customer', async () => { + test('should sign in with default customer', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'sighInFo', baseContext); await foLoginPage.customerLogin(page, dataCustomers.johnDoe); @@ -108,7 +120,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(isCustomerConnected, 'Customer is not connected').toEqual(true); }); - await test.step('should go to all products page', async () => { + test('should go to all products page', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToAllProducts', baseContext); await foHomePage.goToAllProductsPage(page); @@ -119,7 +131,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { for (let idxProduct: number = 1; idxProduct <= 3; idxProduct++) { // eslint-disable-next-line no-loop-func - await test.step(`should add product #${idxProduct} to wishlist`, async () => { + test(`should add product #${idxProduct} to wishlist`, async () => { await testContext.addContextItem(test.info(), 'testIdentifier', `addToFavorite${idxProduct}`, baseContext); const textResult = await foCategoryPage.addToWishList(page, idxProduct); @@ -130,7 +142,7 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { }); } - await test.step('should logout', async () => { + test('should logout', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'foLogout', baseContext); await foCategoryPage.logout(page); @@ -139,17 +151,17 @@ test('Wishlist module - Statistics tab settings', async ({ page, context }) => { expect(isCustomerConnected).toEqual(false); }); - await test.step('should go to BO', async () => { + test('should go to BO', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'goToBoBack', baseContext); - page = await foHomePage.closePage(context, page, 0); + page = await foHomePage.closePage(browserContext, page, 0); const pageTitle = await modBlockwishlistBoStatistics.getPageTitle(page); expect(pageTitle).toContain(modBlockwishlistBoStatistics.pageTitle); }); // @todo : https://github.com/PrestaShop/PrestaShop/issues/33374 - await test.step('should click on the refresh button', async () => { + test('should click on the refresh button', async () => { await testContext.addContextItem(test.info(), 'testIdentifier', 'clickOnRefreshButton', baseContext); test.skip(true, 'https://github.com/PrestaShop/PrestaShop/issues/33374'); diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 94042d02..6e22a740 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.5", + "@prestashop-core/ui-testing": "^0.0.6", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" @@ -51,9 +51,9 @@ } }, "node_modules/@prestashop-core/ui-testing": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.5.tgz", - "integrity": "sha512-7VLuCZNrqNiGZJncXYDYU1LpfFJg0irgi+5OFnXkrM3nGhTnrjSZWb9m/vSFjFNEYP+ewT2zl6SwFG6yMyM49g==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.6.tgz", + "integrity": "sha512-aq8oyemHtYXbCFP7bjKytFaJXq2dbc67kQNAzEGKgrOSuOPCTB1UO9CQ6x5aG90MasSBHMlj4sTOZaJuFALUtw==", "dev": true, "dependencies": { "@faker-js/faker": "^8.3.1", @@ -601,9 +601,9 @@ } }, "@prestashop-core/ui-testing": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.5.tgz", - "integrity": "sha512-7VLuCZNrqNiGZJncXYDYU1LpfFJg0irgi+5OFnXkrM3nGhTnrjSZWb9m/vSFjFNEYP+ewT2zl6SwFG6yMyM49g==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@prestashop-core/ui-testing/-/ui-testing-0.0.6.tgz", + "integrity": "sha512-aq8oyemHtYXbCFP7bjKytFaJXq2dbc67kQNAzEGKgrOSuOPCTB1UO9CQ6x5aG90MasSBHMlj4sTOZaJuFALUtw==", "dev": true, "requires": { "@faker-js/faker": "^8.3.1", diff --git a/tests/UI/package.json b/tests/UI/package.json index 9a4c827b..d3ba72cd 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -8,7 +8,7 @@ "license": "MIT", "devDependencies": { "@playwright/test": "^1.40.1", - "@prestashop-core/ui-testing": "^0.0.5", + "@prestashop-core/ui-testing": "^0.0.6", "@types/node": "^20.11.5", "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index 24f286ad..ba33d4b0 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -82,16 +82,16 @@ loadGlobal(); export default defineConfig({ testDir: './', /* Run tests in files in parallel */ - fullyParallel: true, + fullyParallel: false, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, retries: 0, workers: 1, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ + ['list', { printSteps: true }], ['json', { outputFolder: 'reports' }], ['html', { outputFolder: 'reports' }], - [ './reporters/mochawesome.js', { outputJSON: true, reportDir: 'reports'} ] ], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { From 574011d5908b14f2385805e912d8c99a7ee5bc1b Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 25 Jan 2024 15:57:36 +0100 Subject: [PATCH 20/73] Update config reporter --- .gitignore | 1 + tests/UI/playwright.config.ts | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 44ba6ef9..ce688301 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ node_modules ## UI Tests /tests/UI/.env /tests/UI/node_modules/ +/tests/UI/report.json /tests/UI/reports/ diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index ba33d4b0..ba93bb90 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -81,7 +81,7 @@ loadGlobal(); */ export default defineConfig({ testDir: './', - /* Run tests in files in parallel */ + /* Run tests in files in serial */ fullyParallel: false, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, @@ -90,17 +90,11 @@ export default defineConfig({ /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ ['list', { printSteps: true }], - ['json', { outputFolder: 'reports' }], + ['json', { outputFile: 'report.json' }], ['html', { outputFolder: 'reports' }], ], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { - /* Base URL to use in actions like `await page.goto('/')`. */ - // baseURL: 'http://127.0.0.1:3000', - - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry', - /* Capture screenshot after each test failure */ screenshot: 'only-on-failure', }, From 9218da8131cba5a6e0e3e9687e26eb119d7f5108 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Fri, 26 Jan 2024 11:58:47 +0100 Subject: [PATCH 21/73] Use Core config --- tests/UI/docker-compose.yml | 3 ++- tests/UI/playwright.config.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index ca26440e..5222a535 100644 --- a/tests/UI/docker-compose.yml +++ b/tests/UI/docker-compose.yml @@ -14,7 +14,8 @@ services: - PS_INSTALL_AUTO=1 - PS_FOLDER_ADMIN=admin-dev - PS_FOLDER_INSTALL=install-dev - - ADMIN_MAIL=admin@prestashop.com + - PS_USE_DOCKER_MAILDEV=0 + - ADMIN_MAIL=demo@prestashop.com - ADMIN_PASSWD=prestashop - DB_SERVER=mysql - DB_USER=prestashop diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index ba93bb90..0d64da8e 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -14,7 +14,7 @@ function loadGlobal(): void { global.BO = { URL: process.env.URL_BO || `${global.FO.URL}admin-dev/`, - EMAIL: process.env.LOGIN || 'admin@prestashop.com', + EMAIL: process.env.LOGIN || 'demo@prestashop.com', PASSWD: process.env.PASSWD || 'prestashop', FIRSTNAME: process.env.FIRSTNAME || 'Marc', LASTNAME: process.env.LASTNAME || 'Beier', From f3a408263030d0f3c26ffe3571ccb8c07476a70a Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 1 Feb 2024 13:33:35 +0100 Subject: [PATCH 22/73] Added workflow nightly --- .github/workflows/ui-test.yml | 66 ++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 95329fc1..96dbb4a3 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -1,5 +1,17 @@ name: UI Tests -on: [push, pull_request] +on: + ## Check each PR + push: + pull_request: + ## Manual execution on branch + workflow_dispatch: + ## Nightly + ### Needs secrets + #### GC_PROJECT_ID + #### GC_SERVICE_KEY + #### NIGHTLY_TOKEN + schedule: + - cron: '0 0 * * *' jobs: ui_test: name: UI Tests @@ -25,26 +37,64 @@ jobs: run: npm install && npm run build - name: Start containers + working-directory: tests/UI/ run: | docker-compose -f "docker-compose.yml" up -d --build while ! nc -z localhost 80; do sleep 1; done; - working-directory: tests/UI/ - name: Install dependencies - run: npm ci working-directory: tests/UI/ + run: npm ci - name: Install Playwright Browsers - run: npx playwright install chromium --with-deps working-directory: tests/UI/ + run: npx playwright install chromium --with-deps - name: Run Playwright tests - run: npx playwright test working-directory: tests/UI/ + run: npx playwright test - - uses: actions/upload-artifact@v3 + - name: Upload artifact + uses: actions/upload-artifact@v3 if: always() with: name: playwright-report - path: tests/UI/reports/ - retention-days: 30 \ No newline at end of file + path: + tests/UI/reports/ + tests/UI/report.json + retention-days: 30 + + # Nightly : Rename file + - name: "Nightly : Rename file" + working-directory: tests/UI/ + if: ${{ github.event_name == 'schedule' }} + run: | + mkdir -p nightly + REPORT_NAME="blockwishlist_$(date +%Y-%m-%d)-${{ env.PS_VERSION }}" + mv report.json nightly/${REPORT_NAME}.json + + # Nightly : Auth GCP + - name: "Nightly : Auth GCP" + uses: google-github-actions/auth@v1 + if: ${{ github.event_name == 'schedule' }} + with: + credentials_json: ${{ secrets.GC_SERVICE_KEY }} + project_id: ${{ secrets.GC_PROJECT_ID }} + + # Nightly : Setup GCP + - name: "Nightly : Setup GCP" + uses: google-github-actions/setup-gcloud@v1 + if: ${{ github.event_name == 'schedule' }} + + # Nightly : Upload to Google Cloud Storage (GCS) + - name: "Nightly : Upload to Google Cloud Storage (GCS)" + working-directory: tests/UI/ + if: ${{ github.event_name == 'schedule' }} + run: gsutil cp -r "nightly/**" gs://prestashop-core-nightly/reports + + # Nightly : Push Report + - name: "Nightly : Push Report" + if: ${{ github.event_name == 'schedule' }} + run: | + REPORT_NAME="blockwishlist_$(date +%Y-%m-%d)-${{ env.PS_VERSION }}" + curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json" \ No newline at end of file From 36154317c5d2e24af27ebd7cd19f5e9eb100e6e1 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 1 Feb 2024 14:04:06 +0100 Subject: [PATCH 23/73] Update the action `actions/upload-artifact` to v4 --- .github/workflows/ui-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 96dbb4a3..a66f7a9f 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -55,7 +55,7 @@ jobs: run: npx playwright test - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: playwright-report From 3acfbc5b711b936773e4d31308d5d8f9f7c1dfd7 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 6 Feb 2024 10:49:56 +0100 Subject: [PATCH 24/73] Added logs Docker --- .github/workflows/ui-test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index a66f7a9f..ef4e3077 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -54,14 +54,20 @@ jobs: working-directory: tests/UI/ run: npx playwright test + - name: Export Docker errors + working-directory: tests/UI/ + if: always() + run: docker-compose logs --no-color >& docker-compose.log + - name: Upload artifact uses: actions/upload-artifact@v4 if: always() with: - name: playwright-report - path: + name: playwright-report-${{ env.PS_VERSION }} + path: | tests/UI/reports/ tests/UI/report.json + tests/UI/docker-compose.log retention-days: 30 # Nightly : Rename file From 09c4b30d8673e6a0dd200866db82d2374009c904 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 09:07:19 +0100 Subject: [PATCH 25/73] Changed check URL after docker up --- .github/workflows/ui-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index ef4e3077..3481fc92 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -40,7 +40,7 @@ jobs: working-directory: tests/UI/ run: | docker-compose -f "docker-compose.yml" up -d --build - while ! nc -z localhost 80; do sleep 1; done; + bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost/en/)" != "200" ]]; do sleep 5; done' - name: Install dependencies working-directory: tests/UI/ From c59e9a5b44370590733859e5387d0baf7ecdbde4 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 09:17:03 +0100 Subject: [PATCH 26/73] Removed mochawesome reporter --- tests/UI/reporters/mochawesome.js | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 tests/UI/reporters/mochawesome.js diff --git a/tests/UI/reporters/mochawesome.js b/tests/UI/reporters/mochawesome.js deleted file mode 100644 index c8ec0467..00000000 --- a/tests/UI/reporters/mochawesome.js +++ /dev/null @@ -1,3 +0,0 @@ -const pwmochawesome = require('pwmochawesome'); - -module.exports = pwmochawesome; \ No newline at end of file From 85c15d58feffaa7cfbdf5e84bbeb9bae2de06647 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 09:22:15 +0100 Subject: [PATCH 27/73] Added dependabot --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d582a35e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/tests/UI" + schedule: + interval: weekly + day: monday + time: "04:00" + open-pull-requests-limit: 10 + target-branch: dev + reviewers: + - "PrestaShop/qa-automation" + labels: + - "dependencies" + - "E2E Tests" + - "TE" \ No newline at end of file From f7fdd6974356e0679c96b947e4eba1315112b397 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 09:23:46 +0100 Subject: [PATCH 28/73] Added support to 8.1.4 --- .github/workflows/ui-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 3481fc92..c49a0bb8 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -21,7 +21,7 @@ jobs: matrix: ps-version: - '8.0.5' - - '8.1.3' + - '8.1.4' - 'nightly' env: PS_VERSION: ${{ matrix.ps-version }} From b320b4eb2f2952b63a9121167310136722394597 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 12:04:34 +0100 Subject: [PATCH 29/73] Fixed some spaces --- .github/dependabot.yml | 2 +- .github/workflows/ui-test.yml | 2 +- tests/UI/tsconfig.json | 46 +++++++++++++++++------------------ tests/UI/types/global.d.ts | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d582a35e..5e4fa3e5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,4 +13,4 @@ updates: labels: - "dependencies" - "E2E Tests" - - "TE" \ No newline at end of file + - "TE" diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index c49a0bb8..56147740 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -103,4 +103,4 @@ jobs: if: ${{ github.event_name == 'schedule' }} run: | REPORT_NAME="blockwishlist_$(date +%Y-%m-%d)-${{ env.PS_VERSION }}" - curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json" \ No newline at end of file + curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json" diff --git a/tests/UI/tsconfig.json b/tests/UI/tsconfig.json index 6f4c3f42..f52e6323 100644 --- a/tests/UI/tsconfig.json +++ b/tests/UI/tsconfig.json @@ -1,24 +1,24 @@ { - "compilerOptions": { - "noImplicitAny": true, - "noImplicitThis": true, - "module": "es2022", - "target": "es2017", - "strict": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "resolveJsonModule": true, - "esModuleInterop": true, - "allowJs": true, - "downlevelIteration": true, - "baseUrl": "./", - "paths": {}, - "typeRoots": [ - "node_modules/@types" - ], - "skipLibCheck": true, - "noEmit": true - }, - "include": ["types/global.d.ts", "campaigns/**/*"], - "exclude": ["node_modules"] - } \ No newline at end of file + "compilerOptions": { + "noImplicitAny": true, + "noImplicitThis": true, + "module": "es2022", + "target": "es2017", + "strict": true, + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "allowJs": true, + "downlevelIteration": true, + "baseUrl": "./", + "paths": {}, + "typeRoots": [ + "node_modules/@types" + ], + "skipLibCheck": true, + "noEmit": true + }, + "include": ["types/global.d.ts", "campaigns/**/*"], + "exclude": ["node_modules"] +} diff --git a/tests/UI/types/global.d.ts b/tests/UI/types/global.d.ts index 2ea76cdb..a9a68ab7 100644 --- a/tests/UI/types/global.d.ts +++ b/tests/UI/types/global.d.ts @@ -24,4 +24,4 @@ declare global { var browserErrors: GlobalBrowserErrors; } -export {}; \ No newline at end of file +export {}; From b96aa6dfe5576a10a43ddf330ae52886181ec3f4 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 12:32:43 +0100 Subject: [PATCH 30/73] Fixed matrix --- .github/workflows/ui-test.yml | 12 ++++++++---- tests/UI/docker-compose.yml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 56147740..861f385f 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -19,12 +19,16 @@ jobs: strategy: fail-fast: false matrix: - ps-version: - - '8.0.5' - - '8.1.4' - - 'nightly' + include: + - ps-version: '8.0.5' + php-version: '8.1' + - ps-version: '8.1.4' + php-version: '8.1' + - ps-version: 'nightly' + php-version: '8.2' env: PS_VERSION: ${{ matrix.ps-version }} + PHP_VERSION: ${{ matrix.php-version }} steps: - name: Checkout uses: actions/checkout@v3.1.0 diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index 5222a535..079ae6ca 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}-${PHP_VERSION}-apache container_name: prestashop depends_on: - mysql From 4ff182b7dae8d51072188c936b12bb373f996550 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 20 Feb 2024 14:12:28 +0100 Subject: [PATCH 31/73] Tests UI : Remove pwmochamesome dependency --- tests/UI/package-lock.json | 720 ------------------------------------- tests/UI/package.json | 1 - 2 files changed, 721 deletions(-) diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 6e22a740..3c0e7ca3 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -15,7 +15,6 @@ "@playwright/test": "^1.40.1", "@prestashop-core/ui-testing": "^0.0.6", "@types/node": "^20.11.5", - "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" } }, @@ -70,87 +69,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/dateformat": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/dotenv": { "version": "16.3.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", @@ -162,41 +80,6 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", @@ -211,81 +94,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/fsu": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fsu/-/fsu-1.1.1.tgz", - "integrity": "sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==", - "dev": true - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", - "dev": true - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -298,47 +106,6 @@ "node": ">=10" } }, - "node_modules/mochawesome-report-generator": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz", - "integrity": "sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "dateformat": "^4.5.1", - "escape-html": "^1.0.3", - "fs-extra": "^10.0.0", - "fsu": "^1.1.1", - "lodash.isfunction": "^3.0.9", - "opener": "^1.5.2", - "prop-types": "^15.7.2", - "tcomb": "^3.2.17", - "tcomb-validation": "^3.3.0", - "validator": "^13.6.0", - "yargs": "^17.2.1" - }, - "bin": { - "marge": "bin/cli.js" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, "node_modules/playwright": { "version": "1.40.1", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", @@ -369,43 +136,6 @@ "node": ">=16" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/pwmochawesome": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pwmochawesome/-/pwmochawesome-1.1.1.tgz", - "integrity": "sha512-Gceyrsut9tD6fe8vpJoGcR9WNn92aOscTXnFgjmnQB6HbtXXtAhUCOU2HrKw0TWf/+cyD0FMYEeYSL8qvLVTeA==", - "dev": true, - "dependencies": { - "mochawesome-report-generator": "^6.2.0", - "strip-ansi": "^6.0.1", - "uuid": "^9.0.1" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -421,59 +151,6 @@ "node": ">=10" } }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tcomb": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/tcomb/-/tcomb-3.2.29.tgz", - "integrity": "sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==", - "dev": true - }, - "node_modules/tcomb-validation": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tcomb-validation/-/tcomb-validation-3.4.1.tgz", - "integrity": "sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==", - "dev": true, - "dependencies": { - "tcomb": "^3.0.0" - } - }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -493,95 +170,11 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } } }, "dependencies": { @@ -620,97 +213,11 @@ "undici-types": "~5.26.4" } }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "dateformat": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", - "dev": true - }, "dotenv": { "version": "16.3.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, "fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", @@ -718,67 +225,6 @@ "dev": true, "optional": true }, - "fsu": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fsu/-/fsu-1.1.1.tgz", - "integrity": "sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -788,38 +234,6 @@ "yallist": "^4.0.0" } }, - "mochawesome-report-generator": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz", - "integrity": "sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==", - "dev": true, - "requires": { - "chalk": "^4.1.2", - "dateformat": "^4.5.1", - "escape-html": "^1.0.3", - "fs-extra": "^10.0.0", - "fsu": "^1.1.1", - "lodash.isfunction": "^3.0.9", - "opener": "^1.5.2", - "prop-types": "^15.7.2", - "tcomb": "^3.2.17", - "tcomb-validation": "^3.3.0", - "validator": "^13.6.0", - "yargs": "^17.2.1" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true - }, - "opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true - }, "playwright": { "version": "1.40.1", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", @@ -836,40 +250,6 @@ "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", "dev": true }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "pwmochawesome": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pwmochawesome/-/pwmochawesome-1.1.1.tgz", - "integrity": "sha512-Gceyrsut9tD6fe8vpJoGcR9WNn92aOscTXnFgjmnQB6HbtXXtAhUCOU2HrKw0TWf/+cyD0FMYEeYSL8qvLVTeA==", - "dev": true, - "requires": { - "mochawesome-report-generator": "^6.2.0", - "strip-ansi": "^6.0.1", - "uuid": "^9.0.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, "semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -879,50 +259,6 @@ "lru-cache": "^6.0.0" } }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "tcomb": { - "version": "3.2.29", - "resolved": "https://registry.npmjs.org/tcomb/-/tcomb-3.2.29.tgz", - "integrity": "sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==", - "dev": true - }, - "tcomb-validation": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tcomb-validation/-/tcomb-validation-3.4.1.tgz", - "integrity": "sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==", - "dev": true, - "requires": { - "tcomb": "^3.0.0" - } - }, "typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -935,67 +271,11 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true - }, - "uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true - }, - "validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true } } } diff --git a/tests/UI/package.json b/tests/UI/package.json index d3ba72cd..8c60b966 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -10,7 +10,6 @@ "@playwright/test": "^1.40.1", "@prestashop-core/ui-testing": "^0.0.6", "@types/node": "^20.11.5", - "pwmochawesome": "^1.1.1", "typescript": "^5.3.3" }, "dependencies": { From ed4e4efa0a5b1feec0b8db8ee82aa2bb3b1f7657 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:27:11 +0000 Subject: [PATCH 32/73] Bump @types/node from 20.11.5 to 20.11.19 in /tests/UI Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.5 to 20.11.19. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- tests/UI/package-lock.json | 14 +++++++------- tests/UI/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 3c0e7ca3..9660fe80 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -14,7 +14,7 @@ "devDependencies": { "@playwright/test": "^1.40.1", "@prestashop-core/ui-testing": "^0.0.6", - "@types/node": "^20.11.5", + "@types/node": "^20.11.19", "typescript": "^5.3.3" } }, @@ -61,9 +61,9 @@ } }, "node_modules/@types/node": { - "version": "20.11.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", - "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -205,9 +205,9 @@ } }, "@types/node": { - "version": "20.11.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", - "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", "dev": true, "requires": { "undici-types": "~5.26.4" diff --git a/tests/UI/package.json b/tests/UI/package.json index 8c60b966..7cff6c23 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -9,7 +9,7 @@ "devDependencies": { "@playwright/test": "^1.40.1", "@prestashop-core/ui-testing": "^0.0.6", - "@types/node": "^20.11.5", + "@types/node": "^20.11.19", "typescript": "^5.3.3" }, "dependencies": { From 7d47758f056d0fc0da369b3d75e8b6cfcc28f31a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:27:41 +0000 Subject: [PATCH 33/73] Bump dotenv from 16.3.1 to 16.4.5 in /tests/UI Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.3.1 to 16.4.5. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.4.5) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- tests/UI/package-lock.json | 16 ++++++++-------- tests/UI/package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 3c0e7ca3..d4b45c14 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "dotenv": "^16.3.1" + "dotenv": "^16.4.5" }, "devDependencies": { "@playwright/test": "^1.40.1", @@ -70,14 +70,14 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/fsevents": { @@ -214,9 +214,9 @@ } }, "dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" }, "fsevents": { "version": "2.3.2", diff --git a/tests/UI/package.json b/tests/UI/package.json index 8c60b966..964ae0f3 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -13,6 +13,6 @@ "typescript": "^5.3.3" }, "dependencies": { - "dotenv": "^16.3.1" + "dotenv": "^16.4.5" } } From 6b4b58a2e733eaad46de4e20c5c962053edb7500 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:35:43 +0000 Subject: [PATCH 34/73] Bump @playwright/test from 1.40.1 to 1.41.2 in /tests/UI Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.40.1 to 1.41.2. - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](https://github.com/microsoft/playwright/compare/v1.40.1...v1.41.2) --- updated-dependencies: - dependency-name: "@playwright/test" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- tests/UI/package-lock.json | 46 +++++++++++++++++++------------------- tests/UI/package.json | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 757436f3..3291738b 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -12,7 +12,7 @@ "dotenv": "^16.4.5" }, "devDependencies": { - "@playwright/test": "^1.40.1", + "@playwright/test": "^1.41.2", "@prestashop-core/ui-testing": "^0.0.6", "@types/node": "^20.11.19", "typescript": "^5.3.3" @@ -35,12 +35,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", - "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz", + "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==", "dev": true, "dependencies": { - "playwright": "1.40.1" + "playwright": "1.41.2" }, "bin": { "playwright": "cli.js" @@ -107,12 +107,12 @@ } }, "node_modules/playwright": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", - "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz", + "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==", "dev": true, "dependencies": { - "playwright-core": "1.40.1" + "playwright-core": "1.41.2" }, "bin": { "playwright": "cli.js" @@ -125,9 +125,9 @@ } }, "node_modules/playwright-core": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", - "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz", + "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -185,12 +185,12 @@ "dev": true }, "@playwright/test": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", - "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz", + "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==", "dev": true, "requires": { - "playwright": "1.40.1" + "playwright": "1.41.2" } }, "@prestashop-core/ui-testing": { @@ -235,19 +235,19 @@ } }, "playwright": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", - "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz", + "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==", "dev": true, "requires": { "fsevents": "2.3.2", - "playwright-core": "1.40.1" + "playwright-core": "1.41.2" } }, "playwright-core": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", - "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz", + "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==", "dev": true }, "semver": { diff --git a/tests/UI/package.json b/tests/UI/package.json index ce506ae5..88217f3e 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -7,7 +7,7 @@ "author": "", "license": "MIT", "devDependencies": { - "@playwright/test": "^1.40.1", + "@playwright/test": "^1.41.2", "@prestashop-core/ui-testing": "^0.0.6", "@types/node": "^20.11.19", "typescript": "^5.3.3" From a64b9f5326ec03cdf35585d91e3b95a4123a0017 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 21 Feb 2024 14:42:01 +0100 Subject: [PATCH 35/73] UI Tests : Add permissions --- .github/workflows/ui-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 861f385f..dec678b6 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -12,6 +12,10 @@ on: #### NIGHTLY_TOKEN schedule: - cron: '0 0 * * *' + +permissions: + contents: write + jobs: ui_test: name: UI Tests From 563099819251d2127353574f301b07cb3406e1a1 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 21 Feb 2024 16:44:50 +0100 Subject: [PATCH 36/73] Remove duplicated dependencies --- tests/UI/package-lock.json | 60 +++----------------------------------- tests/UI/package.json | 5 ---- 2 files changed, 4 insertions(+), 61 deletions(-) diff --git a/tests/UI/package-lock.json b/tests/UI/package-lock.json index 3291738b..06387c38 100644 --- a/tests/UI/package-lock.json +++ b/tests/UI/package-lock.json @@ -8,14 +8,9 @@ "name": "blockwishlist_tests_ui", "version": "1.0.0", "license": "MIT", - "dependencies": { - "dotenv": "^16.4.5" - }, "devDependencies": { - "@playwright/test": "^1.41.2", "@prestashop-core/ui-testing": "^0.0.6", - "@types/node": "^20.11.19", - "typescript": "^5.3.3" + "dotenv": "^16.4.5" } }, "node_modules/@faker-js/faker": { @@ -60,19 +55,11 @@ "semver": "^7.5.4" } }, - "node_modules/@types/node": { - "version": "20.11.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", - "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, "node_modules/dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, "engines": { "node": ">=12" }, @@ -151,25 +138,6 @@ "node": ">=10" } }, - "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -204,19 +172,11 @@ "semver": "^7.5.4" } }, - "@types/node": { - "version": "20.11.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", - "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", - "dev": true, - "requires": { - "undici-types": "~5.26.4" - } - }, "dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true }, "fsevents": { "version": "2.3.2", @@ -259,18 +219,6 @@ "lru-cache": "^6.0.0" } }, - "typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true - }, - "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/tests/UI/package.json b/tests/UI/package.json index 88217f3e..188c2533 100644 --- a/tests/UI/package.json +++ b/tests/UI/package.json @@ -7,12 +7,7 @@ "author": "", "license": "MIT", "devDependencies": { - "@playwright/test": "^1.41.2", "@prestashop-core/ui-testing": "^0.0.6", - "@types/node": "^20.11.19", - "typescript": "^5.3.3" - }, - "dependencies": { "dotenv": "^16.4.5" } } From a5aad12a60882771de4f4309b4683b986be2f1bc Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 22 Feb 2024 11:03:06 +0100 Subject: [PATCH 37/73] UI Tests : Push to GCP --- .github/workflows/ui-test.yml | 97 ++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index dec678b6..75a9b1f0 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -13,31 +13,33 @@ on: schedule: - cron: '0 0 * * *' -permissions: - contents: write +env: + CAMPAIGN: 'blockwishlist' jobs: ui_test: name: UI Tests runs-on: ubuntu-latest + strategy: fail-fast: false matrix: include: - - ps-version: '8.0.5' - php-version: '8.1' - - ps-version: '8.1.4' - php-version: '8.1' - - ps-version: 'nightly' - php-version: '8.2' - env: - PS_VERSION: ${{ matrix.ps-version }} - PHP_VERSION: ${{ matrix.php-version }} + - PS_VERSION: '8.0.5' + PHP_VERSION: '8.1' + - PS_VERSION: '8.1.4' + PHP_VERSION: '8.1' + - PS_VERSION: 'nightly' + PHP_VERSION: '8.2' + steps: - name: Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - - uses: actions/setup-node@v3 + - name: Setup Node + uses: actions/setup-node@v3 with: node-version: 14 @@ -46,6 +48,9 @@ jobs: - name: Start containers working-directory: tests/UI/ + env: + PS_VERSION: ${{ matrix.PS_VERSION }} + PHP_VERSION: ${{ matrix.PHP_VERSION }} run: | docker-compose -f "docker-compose.yml" up -d --build bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost/en/)" != "200" ]]; do sleep 5; done' @@ -62,53 +67,85 @@ jobs: working-directory: tests/UI/ run: npx playwright test + - name: Upload artifact report + uses: actions/upload-artifact@v4 + with: + name: playwright-report-${{ matrix.PS_VERSION }} + path: tests/UI/report.json + - name: Export Docker errors working-directory: tests/UI/ if: always() run: docker-compose logs --no-color >& docker-compose.log - - name: Upload artifact + - name: Upload artifact logs uses: actions/upload-artifact@v4 if: always() with: - name: playwright-report-${{ env.PS_VERSION }} + name: playwright-logs-${{ matrix.PS_VERSION }} path: | tests/UI/reports/ - tests/UI/report.json tests/UI/docker-compose.log - retention-days: 30 - # Nightly : Rename file + nightly: + name: Nightly Report + if: ${{ github.event_name == 'schedule' }} + needs: + - ui_test + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - PS_VERSION: '8.0.5' + PHP_VERSION: '8.1' + - PS_VERSION: '8.1.4' + PHP_VERSION: '8.1' + - PS_VERSION: 'nightly' + PHP_VERSION: '8.2' + + env: + PS_VERSION: ${{ matrix.PS_VERSION }} + PHP_VERSION: ${{ matrix.PHP_VERSION }} + + permissions: + contents: 'read' + id-token: 'write' + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Download report + uses: actions/download-artifact@v4 + with: + name: playwright-report-${{ matrix.PS_VERSION }} + path: tests/UI/report.json + - name: "Nightly : Rename file" working-directory: tests/UI/ - if: ${{ github.event_name == 'schedule' }} run: | mkdir -p nightly - REPORT_NAME="blockwishlist_$(date +%Y-%m-%d)-${{ env.PS_VERSION }}" + REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}" mv report.json nightly/${REPORT_NAME}.json - # Nightly : Auth GCP - name: "Nightly : Auth GCP" uses: google-github-actions/auth@v1 - if: ${{ github.event_name == 'schedule' }} with: credentials_json: ${{ secrets.GC_SERVICE_KEY }} project_id: ${{ secrets.GC_PROJECT_ID }} - # Nightly : Setup GCP - name: "Nightly : Setup GCP" uses: google-github-actions/setup-gcloud@v1 - if: ${{ github.event_name == 'schedule' }} - # Nightly : Upload to Google Cloud Storage (GCS) - name: "Nightly : Upload to Google Cloud Storage (GCS)" working-directory: tests/UI/ - if: ${{ github.event_name == 'schedule' }} run: gsutil cp -r "nightly/**" gs://prestashop-core-nightly/reports - # Nightly : Push Report - name: "Nightly : Push Report" - if: ${{ github.event_name == 'schedule' }} run: | - REPORT_NAME="blockwishlist_$(date +%Y-%m-%d)-${{ env.PS_VERSION }}" - curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json" + REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}" + curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json&campaign=${{ env.CAMPAIGN }}&platform=chromium" From b107eca3174cf57516034307894d783ffbbb6add Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Fri, 23 Feb 2024 08:42:55 +0100 Subject: [PATCH 38/73] UI Tests : Fixed output of the download-artifact --- .github/workflows/ui-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 75a9b1f0..9c65a9a9 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -123,7 +123,7 @@ jobs: uses: actions/download-artifact@v4 with: name: playwright-report-${{ matrix.PS_VERSION }} - path: tests/UI/report.json + path: tests/UI/ - name: "Nightly : Rename file" working-directory: tests/UI/ From fc314f03a409856ccd36d941a818308f2b8655d6 Mon Sep 17 00:00:00 2001 From: SharakPL Date: Sat, 2 Mar 2024 14:31:43 +0100 Subject: [PATCH 39/73] Fix buttons on wishlist products --- _dev/front/js/components/Product/Product.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/_dev/front/js/components/Product/Product.vue b/_dev/front/js/components/Product/Product.vue index 764faeeb..89f96e0d 100644 --- a/_dev/front/js/components/Product/Product.vue +++ b/_dev/front/js/components/Product/Product.vue @@ -116,23 +116,23 @@