diff --git a/tests/e2e/TimeoutConstants.ts b/tests/e2e/TimeoutConstants.ts index d7ab33547e..b00344ce74 100644 --- a/tests/e2e/TimeoutConstants.ts +++ b/tests/e2e/TimeoutConstants.ts @@ -93,6 +93,11 @@ export const TimeoutConstants = { */ TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT: Number(process.env.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT) || 5_000, + /** + * Timeout for waiting workspace sample import, 50_000 by default. + */ + TS_IMPORT_PROJECT_DEFAULT_POLLING: Number(process.env.TS_SELENIUM_DEFAULT_POLLING) || 50_000, + // -------------------------------------------- EDITOR -------------------------------------------- /** diff --git a/tests/e2e/pageobjects/ide/ProjectTree.ts b/tests/e2e/pageobjects/ide/ProjectTree.ts index 69a5e5ac82..e18a91c9f3 100644 --- a/tests/e2e/pageobjects/ide/ProjectTree.ts +++ b/tests/e2e/pageobjects/ide/ProjectTree.ts @@ -222,7 +222,7 @@ export class ProjectTree { async waitProjectImported(projectName: string, rootSubItem: string, attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS, - visibilityItemPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5, + visibilityItemPolling: number = TimeoutConstants.TS_IMPORT_PROJECT_DEFAULT_POLLING, triesPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 30) { Logger.debug(`ProjectTree.waitProjectImported "${projectName}" rootSubItem: "${rootSubItem}"`); @@ -238,7 +238,6 @@ export class ProjectTree { if (!isProjectFolderVisible) { Logger.trace(`ProjectTree.waitProjectImported project not located, reloading page.`); await this.driverHelper.reloadPage(); - await this.driverHelper.wait(triesPolling); await this.ide.waitAndSwitchToIdeFrame(); await this.ide.waitIde(); await this.openProjectTreeContainer(); @@ -255,7 +254,6 @@ export class ProjectTree { if (!isRootSubItemVisible) { Logger.trace(`ProjectTree.waitProjectImported sub-items not found, reloading page.`); await this.driverHelper.reloadPage(); - await this.driverHelper.wait(triesPolling); await this.ide.waitAndSwitchToIdeFrame(); await this.ide.waitIde(); await this.openProjectTreeContainer(); @@ -266,6 +264,7 @@ export class ProjectTree { } throw new error.TimeoutError('Exceeded the maximum number of checking attempts, project has not been imported'); + } async waitProjectImportedNoSubfolder(projectName: string,