Skip to content

Commit

Permalink
Fixed waitProjectImported by minor tweak in polling - using single at…
Browse files Browse the repository at this point in the history
…tempt caused frequent workspace refreshes

Signed-off-by: Tibor Dancs <[email protected]>
  • Loading branch information
ScrewTSW committed Sep 7, 2020
1 parent bb6b787 commit 53955d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/pageobjects/ide/ProjectTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ export class ProjectTree {
const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${rootSubItem}`));

for (let i = 0; i < attempts; i++) {
const isProjectFolderVisible = await this.driverHelper.waitVisibilityBoolean(rootItemLocator, 1, visibilityItemPolling);
// do five checks of the item in one fifth of the time given for root folder item (was causing frequent reloads of the workspace)
const isProjectFolderVisible = await this.driverHelper.waitVisibilityBoolean(rootItemLocator, 5, visibilityItemPolling / 5);

if (!isProjectFolderVisible) {
Logger.trace(`ProjectTree.waitProjectImported project not located, reloading page.`);
Expand All @@ -283,7 +284,8 @@ export class ProjectTree {
await this.expandItem(rootItem);
await this.waitItemExpanded(rootItem);

const isRootSubItemVisible = await this.driverHelper.waitVisibilityBoolean(rootSubitemLocator, 1, visibilityItemPolling);
// do five checks of the item in one fifth of the time given for root folder item (was causing frequent reloads of the workspace)
const isRootSubItemVisible = await this.driverHelper.waitVisibilityBoolean(rootSubitemLocator, 5, visibilityItemPolling / 5);

if (!isRootSubItemVisible) {
Logger.trace(`ProjectTree.waitProjectImported sub-items not found, reloading page.`);
Expand Down

0 comments on commit 53955d3

Please sign in to comment.