Skip to content

Commit 15eddd7

Browse files
committed
Fix test navigation to context app by reverting to previous
1 parent 62791c3 commit 15eddd7

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

test/functional/page_objects/context_page.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
*/
88

99
import rison from 'rison-node';
10+
import { getUrl } from '@kbn/test';
1011
import { FtrProviderContext } from '../ftr_provider_context';
1112

1213
const DEFAULT_INITIAL_STATE = {
1314
columns: ['@message'],
1415
};
1516

1617
export function ContextPageProvider({ getService, getPageObjects }: FtrProviderContext) {
18+
const browser = getService('browser');
19+
const config = getService('config');
1720
const retry = getService('retry');
1821
const testSubjects = getService('testSubjects');
1922
const PageObjects = getPageObjects(['header', 'common']);
@@ -25,14 +28,14 @@ export function ContextPageProvider({ getService, getPageObjects }: FtrProviderC
2528
...DEFAULT_INITIAL_STATE,
2629
...overrideInitialState,
2730
});
31+
const appUrl = getUrl.noAuth(config.get('servers.kibana'), {
32+
...config.get('apps.context'),
33+
hash: `${config.get('apps.context.hash')}/${indexPattern}/${anchorId}?_a=${initialState}`,
34+
});
2835

29-
await PageObjects.common.navigateToUrl(
30-
'discover',
31-
`#/context/${indexPattern}/${anchorId}?_a=${initialState}`,
32-
{
33-
useActualUrl: true,
34-
}
35-
);
36+
log.debug(`browser.get(${appUrl})`);
37+
38+
await browser.get(appUrl);
3639
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
3740
await this.waitUntilContextLoadingHasFinished();
3841
// For lack of a better way, using a sleep to ensure page is loaded before proceeding

0 commit comments

Comments
 (0)