Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved 8.0.0 directory to develop & Bump version to 0.0.8 #16

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/pages/BO/dashboard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/BO/login/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/BO/modules/blockwishlist/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/BO/modules/blockwishlist/statistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/BO/modules/moduleManager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/BO/orders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/FO/classic/cart/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/FO/classic/category/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/FO/classic/checkout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/FO/classic/checkout/orderConfirmation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/FO/classic/home/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions src/pages/FO/classic/login/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
5 changes: 4 additions & 1 deletion src/utils/testContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -709,4 +709,4 @@ class Order extends BOBasePage implements BOOrdersPageInterface {
}
}

export default new Order();
module.exports = new Order();
Loading