From fcc942f9204734feb1fe3c9d5aca4a03580573a6 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 18 Mar 2024 17:07:58 +0100 Subject: [PATCH] Moved 8.0.0 directory to develop & Bump version to 0.0.8 --- package.json | 2 +- src/pages/BO/dashboard/index.ts | 6 +++--- src/pages/BO/login/index.ts | 6 +++--- src/pages/BO/modules/blockwishlist/index.ts | 6 +++--- src/pages/BO/modules/blockwishlist/statistics.ts | 6 +++--- src/pages/BO/modules/moduleManager/index.ts | 6 +++--- src/pages/BO/orders/index.ts | 6 +++--- src/pages/FO/classic/cart/index.ts | 6 +++--- src/pages/FO/classic/category/index.ts | 6 +++--- src/pages/FO/classic/checkout/index.ts | 6 +++--- src/pages/FO/classic/checkout/orderConfirmation.ts | 6 +++--- src/pages/FO/classic/home/index.ts | 6 +++--- src/pages/FO/classic/login/index.ts | 6 +++--- src/utils/testContext.ts | 5 ++++- src/versions/{8.0.0 => develop}/pages/BO/dashboard/index.ts | 0 src/versions/{8.0.0 => develop}/pages/BO/login/index.ts | 0 .../pages/BO/modules/blockwishlist/index.ts | 0 .../pages/BO/modules/blockwishlist/statistics.ts | 0 .../pages/BO/modules/moduleManager/index.ts | 0 src/versions/{8.0.0 => develop}/pages/BO/orders/index.ts | 2 +- .../{8.0.0 => develop}/pages/FO/classic/cart/index.ts | 0 .../{8.0.0 => develop}/pages/FO/classic/category/index.ts | 0 .../{8.0.0 => develop}/pages/FO/classic/checkout/index.ts | 0 .../pages/FO/classic/checkout/orderConfirmation.ts | 0 .../{8.0.0 => develop}/pages/FO/classic/home/index.ts | 0 .../{8.0.0 => develop}/pages/FO/classic/login/index.ts | 0 26 files changed, 42 insertions(+), 39 deletions(-) rename src/versions/{8.0.0 => develop}/pages/BO/dashboard/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/BO/login/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/BO/modules/blockwishlist/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/BO/modules/blockwishlist/statistics.ts (100%) rename src/versions/{8.0.0 => develop}/pages/BO/modules/moduleManager/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/BO/orders/index.ts (99%) rename src/versions/{8.0.0 => develop}/pages/FO/classic/cart/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/FO/classic/category/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/FO/classic/checkout/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/FO/classic/checkout/orderConfirmation.ts (100%) rename src/versions/{8.0.0 => develop}/pages/FO/classic/home/index.ts (100%) rename src/versions/{8.0.0 => develop}/pages/FO/classic/login/index.ts (100%) diff --git a/package.json b/package.json index aa82f4a1..46ee36fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@prestashop-core/ui-testing", - "version": "0.0.7", + "version": "0.0.8", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/pages/BO/dashboard/index.ts b/src/pages/BO/dashboard/index.ts index 434e62bf..a590fc76 100644 --- a/src/pages/BO/dashboard/index.ts +++ b/src/pages/BO/dashboard/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require */ function requirePage(): DashboardPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/BO/dashboard'); + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/BO/dashboard'); } - return require('@versions/8.0.0/pages/BO/dashboard'); + return require('@versions/develop/pages/BO/dashboard'); } /* eslint-enable global-require */ diff --git a/src/pages/BO/login/index.ts b/src/pages/BO/login/index.ts index b5067223..f08a4ad6 100644 --- a/src/pages/BO/login/index.ts +++ b/src/pages/BO/login/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require */ function requirePage(): LoginPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/BO/login'); + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/BO/login'); } - return require('@versions/8.0.0/pages/BO/login'); + return require('@versions/develop/pages/BO/login'); } /* eslint-enable global-require */ diff --git a/src/pages/BO/modules/blockwishlist/index.ts b/src/pages/BO/modules/blockwishlist/index.ts index 866468cc..7e2974ec 100644 --- a/src/pages/BO/modules/blockwishlist/index.ts +++ b/src/pages/BO/modules/blockwishlist/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require */ function requirePage(): ModuleBlockwishlistMainPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/BO/modules/blockwishlist/index'); + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/BO/modules/blockwishlist/index'); } - return require('@versions/8.0.0/pages/BO/modules/blockwishlist/index'); + return require('@versions/develop/pages/BO/modules/blockwishlist/index'); } /* eslint-enable global-require */ diff --git a/src/pages/BO/modules/blockwishlist/statistics.ts b/src/pages/BO/modules/blockwishlist/statistics.ts index 85b13308..d13996f2 100644 --- a/src/pages/BO/modules/blockwishlist/statistics.ts +++ b/src/pages/BO/modules/blockwishlist/statistics.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require */ function requirePage(): ModuleBlockwishlistStatisticsPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/BO/modules/blockwishlist/statistics'); + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/BO/modules/blockwishlist/statistics'); } - return require('@versions/8.0.0/pages/BO/modules/blockwishlist/statistics'); + return require('@versions/develop/pages/BO/modules/blockwishlist/statistics'); } /* eslint-enable global-require */ diff --git a/src/pages/BO/modules/moduleManager/index.ts b/src/pages/BO/modules/moduleManager/index.ts index 111bf214..89250b78 100644 --- a/src/pages/BO/modules/moduleManager/index.ts +++ b/src/pages/BO/modules/moduleManager/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require, @typescript-eslint/no-var-requires */ function requirePage(): ModuleManagerPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/BO/modules/moduleManager').moduleManager; + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/BO/modules/moduleManager').moduleManager; } - return require('@versions/8.0.0/pages/BO/modules/moduleManager').moduleManager; + return require('@versions/develop/pages/BO/modules/moduleManager').moduleManager; } /* eslint-enable global-require, @typescript-eslint/no-var-requires */ diff --git a/src/pages/BO/orders/index.ts b/src/pages/BO/orders/index.ts index 18da27a4..89a56ac7 100644 --- a/src/pages/BO/orders/index.ts +++ b/src/pages/BO/orders/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require */ function requirePage(): BOOrdersPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/BO/orders'); + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/BO/orders'); } - return require('@versions/8.0.0/pages/BO/orders'); + return require('@versions/develop/pages/BO/orders'); } /* eslint-enable global-require */ diff --git a/src/pages/FO/classic/cart/index.ts b/src/pages/FO/classic/cart/index.ts index 312ef93c..458dbeb9 100644 --- a/src/pages/FO/classic/cart/index.ts +++ b/src/pages/FO/classic/cart/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require, @typescript-eslint/no-var-requires */ function requirePage(): FoCartPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/FO/classic/cart').cartPage; + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/FO/classic/cart').cartPage; } - return require('@versions/8.0.0/pages/FO/classic/cart').cartPage; + return require('@versions/develop/pages/FO/classic/cart').cartPage; } /* eslint-enable global-require, @typescript-eslint/no-var-requires */ diff --git a/src/pages/FO/classic/category/index.ts b/src/pages/FO/classic/category/index.ts index b1ddf92d..a4656a32 100644 --- a/src/pages/FO/classic/category/index.ts +++ b/src/pages/FO/classic/category/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require */ function requirePage(): FoCategoryPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/FO/classic/category'); + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/FO/classic/category'); } - return require('@versions/8.0.0/pages/FO/classic/category'); + return require('@versions/develop/pages/FO/classic/category'); } /* eslint-enable global-require */ diff --git a/src/pages/FO/classic/checkout/index.ts b/src/pages/FO/classic/checkout/index.ts index 74bfb4d8..a6a0f289 100644 --- a/src/pages/FO/classic/checkout/index.ts +++ b/src/pages/FO/classic/checkout/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require, @typescript-eslint/no-var-requires */ function requirePage(): FoCheckoutPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/FO/classic/checkout').checkoutPage; + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/FO/classic/checkout').checkoutPage; } - return require('@versions/8.0.0/pages/FO/classic/checkout').checkoutPage; + return require('@versions/develop/pages/FO/classic/checkout').checkoutPage; } /* eslint-enable global-require, @typescript-eslint/no-var-requires */ diff --git a/src/pages/FO/classic/checkout/orderConfirmation.ts b/src/pages/FO/classic/checkout/orderConfirmation.ts index 1f22ca0a..89a946b8 100644 --- a/src/pages/FO/classic/checkout/orderConfirmation.ts +++ b/src/pages/FO/classic/checkout/orderConfirmation.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require, @typescript-eslint/no-var-requires */ function requirePage(): FoCheckoutOrderConfirmationPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/FO/classic/checkout/orderConfirmation').orderConfirmationPage; + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/FO/classic/checkout/orderConfirmation').orderConfirmationPage; } - return require('@versions/8.0.0/pages/FO/classic/checkout/orderConfirmation').orderConfirmationPage; + return require('@versions/develop/pages/FO/classic/checkout/orderConfirmation').orderConfirmationPage; } /* eslint-enable global-require, @typescript-eslint/no-var-requires */ diff --git a/src/pages/FO/classic/home/index.ts b/src/pages/FO/classic/home/index.ts index 45199522..412fb74d 100644 --- a/src/pages/FO/classic/home/index.ts +++ b/src/pages/FO/classic/home/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require, @typescript-eslint/no-var-requires */ function requirePage(): FoHomePageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/FO/classic/home').homePage; + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/FO/classic/home').homePage; } - return require('@versions/8.0.0/pages/FO/classic/home').homePage; + return require('@versions/develop/pages/FO/classic/home').homePage; } /* eslint-enable global-require, @typescript-eslint/no-var-requires */ diff --git a/src/pages/FO/classic/login/index.ts b/src/pages/FO/classic/login/index.ts index 05611557..17feebec 100644 --- a/src/pages/FO/classic/login/index.ts +++ b/src/pages/FO/classic/login/index.ts @@ -6,10 +6,10 @@ const psVersion = testContext.getPSVersion(); /* eslint-disable global-require, @typescript-eslint/no-var-requires */ function requirePage(): FoLoginPageInterface { - if (semver.gte(psVersion, '8.0.0')) { - return require('@versions/8.0.0/pages/FO/classic/login').loginPage; + if (semver.gte(psVersion, '0.0.0')) { + return require('@versions/develop/pages/FO/classic/login').loginPage; } - return require('@versions/8.0.0/pages/FO/classic/login').loginPage; + return require('@versions/develop/pages/FO/classic/login').loginPage; } /* eslint-enable global-require, @typescript-eslint/no-var-requires */ diff --git a/src/utils/testContext.ts b/src/utils/testContext.ts index 1ead0e61..494f5d3b 100644 --- a/src/utils/testContext.ts +++ b/src/utils/testContext.ts @@ -41,6 +41,9 @@ export default { if (process.env.PS_VERSION === 'nightly') { return '99.99.99'; } - return process.env.PS_VERSION; + const version: string = process.env.PS_VERSION; + + return version + .replace(/^1\.7\./, '7.'); }, }; diff --git a/src/versions/8.0.0/pages/BO/dashboard/index.ts b/src/versions/develop/pages/BO/dashboard/index.ts similarity index 100% rename from src/versions/8.0.0/pages/BO/dashboard/index.ts rename to src/versions/develop/pages/BO/dashboard/index.ts diff --git a/src/versions/8.0.0/pages/BO/login/index.ts b/src/versions/develop/pages/BO/login/index.ts similarity index 100% rename from src/versions/8.0.0/pages/BO/login/index.ts rename to src/versions/develop/pages/BO/login/index.ts diff --git a/src/versions/8.0.0/pages/BO/modules/blockwishlist/index.ts b/src/versions/develop/pages/BO/modules/blockwishlist/index.ts similarity index 100% rename from src/versions/8.0.0/pages/BO/modules/blockwishlist/index.ts rename to src/versions/develop/pages/BO/modules/blockwishlist/index.ts diff --git a/src/versions/8.0.0/pages/BO/modules/blockwishlist/statistics.ts b/src/versions/develop/pages/BO/modules/blockwishlist/statistics.ts similarity index 100% rename from src/versions/8.0.0/pages/BO/modules/blockwishlist/statistics.ts rename to src/versions/develop/pages/BO/modules/blockwishlist/statistics.ts diff --git a/src/versions/8.0.0/pages/BO/modules/moduleManager/index.ts b/src/versions/develop/pages/BO/modules/moduleManager/index.ts similarity index 100% rename from src/versions/8.0.0/pages/BO/modules/moduleManager/index.ts rename to src/versions/develop/pages/BO/modules/moduleManager/index.ts diff --git a/src/versions/8.0.0/pages/BO/orders/index.ts b/src/versions/develop/pages/BO/orders/index.ts similarity index 99% rename from src/versions/8.0.0/pages/BO/orders/index.ts rename to src/versions/develop/pages/BO/orders/index.ts index 34d0d638..069c67b2 100644 --- a/src/versions/8.0.0/pages/BO/orders/index.ts +++ b/src/versions/develop/pages/BO/orders/index.ts @@ -709,4 +709,4 @@ class Order extends BOBasePage implements BOOrdersPageInterface { } } -export default new Order(); +module.exports = new Order(); diff --git a/src/versions/8.0.0/pages/FO/classic/cart/index.ts b/src/versions/develop/pages/FO/classic/cart/index.ts similarity index 100% rename from src/versions/8.0.0/pages/FO/classic/cart/index.ts rename to src/versions/develop/pages/FO/classic/cart/index.ts diff --git a/src/versions/8.0.0/pages/FO/classic/category/index.ts b/src/versions/develop/pages/FO/classic/category/index.ts similarity index 100% rename from src/versions/8.0.0/pages/FO/classic/category/index.ts rename to src/versions/develop/pages/FO/classic/category/index.ts diff --git a/src/versions/8.0.0/pages/FO/classic/checkout/index.ts b/src/versions/develop/pages/FO/classic/checkout/index.ts similarity index 100% rename from src/versions/8.0.0/pages/FO/classic/checkout/index.ts rename to src/versions/develop/pages/FO/classic/checkout/index.ts diff --git a/src/versions/8.0.0/pages/FO/classic/checkout/orderConfirmation.ts b/src/versions/develop/pages/FO/classic/checkout/orderConfirmation.ts similarity index 100% rename from src/versions/8.0.0/pages/FO/classic/checkout/orderConfirmation.ts rename to src/versions/develop/pages/FO/classic/checkout/orderConfirmation.ts diff --git a/src/versions/8.0.0/pages/FO/classic/home/index.ts b/src/versions/develop/pages/FO/classic/home/index.ts similarity index 100% rename from src/versions/8.0.0/pages/FO/classic/home/index.ts rename to src/versions/develop/pages/FO/classic/home/index.ts diff --git a/src/versions/8.0.0/pages/FO/classic/login/index.ts b/src/versions/develop/pages/FO/classic/login/index.ts similarity index 100% rename from src/versions/8.0.0/pages/FO/classic/login/index.ts rename to src/versions/develop/pages/FO/classic/login/index.ts