Rework the "ProjectTree.waitProjectImported" method for avoiding project import rejecting (#18531)
Signed-off-by: Ihor Okhrimenko <iokhrime@redhat.com>7.24.x
parent
f7822d20de
commit
3af8a5b090
|
|
@ -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 --------------------------------------------
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue