File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed
Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,8 @@ export class Dashboard {
168168 async waitStartingPageLoaderDisappearance ( timeout : number = TIMEOUT_CONSTANTS . TS_COMMON_DASHBOARD_WAIT_TIMEOUT ) : Promise < void > {
169169 Logger . debug ( ) ;
170170
171- await this . driverHelper . waitDisappearance ( Dashboard . STARTING_PAGE_LOADER , timeout ) ;
171+ const attempts : number = Math . ceil ( timeout / TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING ) ;
172+ await this . driverHelper . waitDisappearance ( Dashboard . STARTING_PAGE_LOADER , attempts , TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING ) ;
172173 await this . driverHelper . wait ( TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING ) ;
173174 }
174175
@@ -211,7 +212,12 @@ export class Dashboard {
211212 await this . openDashboard ( ) ;
212213 await this . driverHelper . waitAndClick ( Dashboard . USER_SETTINGS_DROPDOWN , timeout ) ;
213214 await this . driverHelper . waitAndClick ( Dashboard . LOGOUT_BUTTON , timeout ) ;
214- await this . driverHelper . waitDisappearance ( Dashboard . USER_SETTINGS_DROPDOWN , timeout ) ;
215+ const attempts : number = Math . ceil ( timeout / TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING ) ;
216+ await this . driverHelper . waitDisappearance (
217+ Dashboard . USER_SETTINGS_DROPDOWN ,
218+ attempts ,
219+ TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING
220+ ) ;
215221 }
216222
217223 async clickContinueWithDefaultDevfileButton ( timeout : number = TIMEOUT_CONSTANTS . TS_CLICK_DASHBOARD_ITEM_TIMEOUT ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ export class DexLoginPage {
5454 async waitDexLoginPageDisappearance ( ) : Promise < void > {
5555 Logger . debug ( ) ;
5656
57- await this . driverHelper . waitDisappearance ( DexLoginPage . DEX_PAGE_CONTENT_CONTAINER , TIMEOUT_CONSTANTS . TS_SELENIUM_LOAD_PAGE_TIMEOUT ) ;
57+ const attempts : number = Math . ceil ( TIMEOUT_CONSTANTS . TS_SELENIUM_LOAD_PAGE_TIMEOUT / TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING ) ;
58+ await this . driverHelper . waitDisappearance (
59+ DexLoginPage . DEX_PAGE_CONTENT_CONTAINER ,
60+ attempts ,
61+ TIMEOUT_CONSTANTS . TS_SELENIUM_DEFAULT_POLLING
62+ ) ;
5863 }
5964}
Original file line number Diff line number Diff line change @@ -103,10 +103,10 @@ export class TestWorkspaceUtil implements ITestWorkspaceUtil {
103103 deleteWorkspaceResponse = await this . processRequestHandler . delete ( deleteWorkspaceApiUrl ) ;
104104 } catch ( error ) {
105105 if ( axios . isAxiosError ( error ) && error . response ?. status === 404 ) {
106- Logger . error ( `the workspace : ${ workspaceName } not found`) ;
107- throw error ;
106+ Logger . info ( `Workspace ${ workspaceName } not found, already deleted `) ;
107+ return ;
108108 }
109- Logger . error ( `delete workspace call failed. URL used: ${ deleteWorkspaceStatus } ` ) ;
109+ Logger . error ( `delete workspace call failed. URL used: ${ deleteWorkspaceApiUrl } ` ) ;
110110 throw error ;
111111 }
112112
@@ -117,12 +117,16 @@ export class TestWorkspaceUtil implements ITestWorkspaceUtil {
117117 for ( let i : number = 0 ; i < this . attempts ; i ++ ) {
118118 try {
119119 deleteWorkspaceResponse = await this . processRequestHandler . get ( deleteWorkspaceApiUrl ) ;
120+ Logger . trace (
121+ `GET ${ deleteWorkspaceApiUrl } returned status: ${ deleteWorkspaceResponse . status } ; data: ${ deleteWorkspaceResponse . data } `
122+ ) ;
120123 } catch ( error ) {
121- if ( axios . isAxiosError ( error ) && error . response ?. status === 404 ) {
124+ if ( axios . isAxiosError ( error ) && ( error . response ?. status === 404 || error . response ?. status === 500 ) ) {
122125 deleteWorkspaceStatus = true ;
123126 Logger . debug ( `${ workspaceName } deleted successfully` ) ;
124127 break ;
125128 }
129+ Logger . trace ( `GET ${ deleteWorkspaceApiUrl } threw error: ${ error } ` ) ;
126130 }
127131 await this . driverHelper . wait ( this . polling ) ;
128132 }
You can’t perform that action at this time.
0 commit comments