File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ export default class HomeDashboardPage extends BaseDashboard {
25
25
await expect ( this . page ) . toHaveURL ( this . PAGE_PATH ) ;
26
26
}
27
27
upgradePmm = async ( ) => {
28
- await this . pmmUpgradeWidget . elements . upgradeButton . waitFor ( { state : 'visible' , timeout : Wait . ThreeMinutes } ) ;
28
+ await this . pmmUpgradeWidget . elements . upgradeButton . waitFor ( { state : 'visible' , timeout : Wait . TwoMinutes } ) ;
29
+
29
30
const currentVersion = await this . pmmUpgradeWidget . elements . currentVersion . textContent ( ) ;
30
31
31
32
await this . pmmUpgradeWidget . elements . upgradeButton . click ( ) ;
Original file line number Diff line number Diff line change @@ -9,12 +9,20 @@ export default class PmmUpgradeWidget {
9
9
elements : any = {
10
10
currentVersion : this . containers . upgradeContainer . getByTestId ( 'update-installed-version' ) ,
11
11
availableVersion : this . containers . upgradeContainer . getByTestId ( 'update-latest-version' ) ,
12
+ checkForUpgradesButton : this . containers . upgradeContainer . getByTestId ( 'update-last-check-button' ) ,
12
13
upToDate : this . containers . upgradeContainer . getByText ( 'You are up to date' ) ,
13
14
lastUpgradeCheckDate : this . containers . upgradeContainer . getByTestId ( 'update-last-check' ) ,
14
15
upgradeButton : this . containers . upgradeContainer . getByText ( 'Upgrade to' , { exact : false } ) ,
15
16
} ;
16
17
17
18
verifyUpgradeWidget = async ( ) => {
19
+ await expect ( this . elements . checkForUpgradesButton ) . toBeEnabled ( { timeout : Wait . ThreeMinutes } ) ;
20
+
21
+ await expect ( async ( ) => {
22
+ await this . elements . checkForUpgradesButton . click ( ) ;
23
+ await this . elements . upgradeButton . waitFor ( { state : 'visible' , timeout : Wait . TwoMinutes } ) ;
24
+ } ) . toPass ( { timeout : Wait . TenMinutes } ) ;
25
+
18
26
await this . elements . upgradeButton . waitFor ( { state : 'visible' , timeout : Wait . ThreeMinutes } ) ;
19
27
await expect ( this . elements . upToDate ) . toBeHidden ( ) ;
20
28
await this . elements . lastUpgradeCheckDate . waitFor ( { state : 'visible' } ) ;
You can’t perform that action at this time.
0 commit comments