Skip to content

Commit 09d3e9f

Browse files
Merge pull request #314 from nesrineabdmouleh/FixGoToNextStepInAutoupgradeModule
Fix go to next step for autoupgrade configure page
2 parents 1803b4f + d9ddff3 commit 09d3e9f

File tree

2 files changed

+7
-3
lines changed
  • src
    • interfaces/BO/modules/autoupgrade
    • versions/develop/pages/BO/modules/autoupgrade

2 files changed

+7
-3
lines changed

src/interfaces/BO/modules/autoupgrade/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface ModuleAutoupgradeMainPageInterface extends ModuleConfigurationP
99
readonly updateSuccessMessage: string;
1010

1111
cancelBackup(page:Page):Promise<boolean>;
12-
checkRequirements(page: Page): Promise<string>;
12+
checkRequirements(page: Page): Promise<boolean>;
1313
checkUpdateSuccess(page:Page):Promise<string>;
1414
chooseNewVersion(page:Page):Promise<boolean>;
1515
clickOnLaunchBackup(page:Page):Promise<boolean>;

src/versions/develop/pages/BO/modules/autoupgrade/index.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class Autoupgrade extends ModuleConfiguration implements ModuleAutoupgradeMainPa
2424

2525
private readonly radioCardLoader: string;
2626

27+
private readonly radioCardLoaderWrapper: string;
28+
2729
private readonly checkRequirementBlock: string;
2830

2931
private readonly checkRequirementsFailedAlerts: string;
@@ -81,6 +83,7 @@ class Autoupgrade extends ModuleConfiguration implements ModuleAutoupgradeMainPa
8183
// 1 : version choose step
8284
this.newVersionRadioButton = '#online';
8385
this.radioCardLoader = '.radio-card__loader-title';
86+
this.radioCardLoaderWrapper = '.radio-card__loader-wrapper';
8487
this.checkRequirementBlock = '.check-requirements';
8588
this.checkRequirementsFailedAlerts = '.check-requirements--failed';
8689
this.goToMaintenancePageLink = '#radio_card_online div.radio-card__check-requirements a[href*="AdminMaintenance"]';
@@ -144,11 +147,12 @@ class Autoupgrade extends ModuleConfiguration implements ModuleAutoupgradeMainPa
144147
* @param page {Page} Browser tab
145148
* @return {Promise<string}
146149
*/
147-
async checkRequirements(page: Page): Promise<string> {
150+
async checkRequirements(page: Page): Promise<boolean> {
148151
await page.locator(this.checkRequirementsButton).click();
149152
await this.waitForVisibleSelector(page, this.radioCardLoader);
153+
await this.waitForHiddenSelector(page, this.radioCardLoaderWrapper);
150154

151-
return this.getTextContent(page, this.alertSuccessMessage);
155+
return this.elementNotVisible(page, `${this.nextStepButton}[disabled='true']`, 2000);
152156
}
153157

154158
/**

0 commit comments

Comments
 (0)