Skip to content

Commit

Permalink
Merge pull request #315 from nesrineabdmouleh/FixAutoupgradePageTitle171
Browse files Browse the repository at this point in the history
Fix autoupgrade page title for PS 1.7.1
  • Loading branch information
Progi1984 authored Jan 10, 2025
2 parents 09d3e9f + 9160bee commit 30d1996
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/pages/BO/modules/autoupgrade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const psVersion = testContext.getPSVersion();

/* eslint-disable global-require, @typescript-eslint/no-require-imports */
function requirePage(): ModuleAutoupgradeMainPageInterface {
if (semver.lte(psVersion, '7.1.2') && semver.gte(psVersion, '7.1.0')) {
return require('@versions/1.7.1/pages/BO/modules/autoupgrade').autoupgrade;
}
if (semver.lt(psVersion, '7.4.0')) {
return require('@versions/1.7.3/pages/BO/modules/autoupgrade').autoupgrade;
}
Expand Down
22 changes: 22 additions & 0 deletions src/versions/1.7.1/pages/BO/modules/autoupgrade/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {ModuleAutoupgradeMainPageInterface} from '@interfaces/BO/modules/autoupgrade';
import {Autoupgrade} from '@versions/1.7.3/pages/BO/modules/autoupgrade';

/**
* Module configuration page for module : Autoupgrade, contains selectors and functions for the page
* @class
* @extends ModuleConfiguration
*/
class AutoupgradeVersion extends Autoupgrade implements ModuleAutoupgradeMainPageInterface {
/**
* @constructs
* Setting up texts and selectors to use on module configuration page
*/
constructor() {
super();

this.pageTitle = `AdminSelfUpgrade > AdminSelfUpgrade • ${global.INSTALL.SHOP_NAME}`;
}
}

const autoupgrade = new AutoupgradeVersion();
export {autoupgrade, AutoupgradeVersion as Autoupgrade};
2 changes: 1 addition & 1 deletion src/versions/develop/pages/BO/modules/autoupgrade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {Page} from '@playwright/test';
* @extends ModuleConfiguration
*/
class Autoupgrade extends ModuleConfiguration implements ModuleAutoupgradeMainPageInterface {
public readonly pageTitle: string;
public pageTitle: string;

public readonly checkRequirementSuccessMessage: string;

Expand Down

0 comments on commit 30d1996

Please sign in to comment.