Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase timeout to wait after module upload in BO #250

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/pages/commonPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,18 @@ export default class CommonPage implements CommonPageInterface {
* @param selector{string} From where to get text
* @param waitForSelector {boolean} True to wait for selector to be visible before getting text
* @param withTrim {boolean} True to trim the text
* @param timeout {number} Time to wait on milliseconds before throwing an error
* @return {Promise<string>}
*/
async getTextContent(
page: Page | Frame,
selector: string,
waitForSelector: boolean = true,
withTrim: boolean = true,
timeout: number = 10000,
): Promise<string> {
if (waitForSelector) {
await this.waitForVisibleSelector(page, selector);
await this.waitForVisibleSelector(page, selector, timeout);
}
const textContent = await page.locator(selector).first().textContent();

Expand Down
4 changes: 2 additions & 2 deletions src/versions/develop/pages/BO/modules/moduleManager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class ModuleManagerPage extends BOBasePage implements ModuleManagerPageInterface

await this.uploadOnFileChooser(page, this.uploadModuleLink, [file]);

return this.getTextContent(page, this.uploadModuleModalSuccessMessage);
return this.getTextContent(page, this.uploadModuleModalSuccessMessage, true, true, 30000);
}

/**
Expand Down Expand Up @@ -492,7 +492,7 @@ class ModuleManagerPage extends BOBasePage implements ModuleManagerPageInterface
}
}

return this.getGrowlMessageContent(page);
return this.getGrowlMessageContent(page, 300000);
}

/**
Expand Down
Loading