mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[FTR] Fix URL checks in navigateToApp (#176546)
## Summary This PR fixes the URL check for successful navigation in the `common` PageObject `navigateToApp` method.
This commit is contained in:
parent
9591304b0d
commit
736af7b0e0
1 changed files with 5 additions and 3 deletions
|
@ -332,14 +332,16 @@ export class CommonPageObject extends FtrService {
|
|||
}
|
||||
|
||||
currentUrl = (await this.browser.getCurrentUrl()).replace(/\/\/\w+:\w+@/, '//');
|
||||
const decodedAppUrl = decodeURIComponent(appUrl);
|
||||
const decodedCurrentUrl = decodeURIComponent(currentUrl);
|
||||
|
||||
const navSuccessful = currentUrl
|
||||
const navSuccessful = decodedCurrentUrl
|
||||
.replace(':80/', '/')
|
||||
.replace(':443/', '/')
|
||||
.startsWith(appUrl.replace(':80/', '/').replace(':443/', '/'));
|
||||
.startsWith(decodedAppUrl.replace(':80/', '/').replace(':443/', '/'));
|
||||
|
||||
if (!navSuccessful) {
|
||||
const msg = `App failed to load: ${appName} in ${this.defaultFindTimeout}ms appUrl=${appUrl} currentUrl=${currentUrl}`;
|
||||
const msg = `App failed to load: ${appName} in ${this.defaultFindTimeout}ms appUrl=${decodedAppUrl} currentUrl=${decodedCurrentUrl}`;
|
||||
this.log.debug(msg);
|
||||
throw new Error(msg);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue