Skip to content

Commit 47ffa99

Browse files
committed
Fix link-to test
1 parent 6e5c874 commit 47ffa99

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

x-pack/test/functional/apps/infra/link_to.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
2323
};
2424
const expectedSearchString =
2525
"logFilter=(expression:'trace.id:433b4651687e18be2c6c8e3b11f53d09',kind:kuery)&logPosition=(position:(tiebreaker:0,time:1565707203194))&sourceId=default";
26-
const expectedRedirect = `/logs/stream?${expectedSearchString}`;
26+
const expectedRedirectPath = '/logs/stream?';
2727

2828
await pageObjects.common.navigateToActualUrl(
2929
'infraOps',
@@ -32,7 +32,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
3232
await retry.tryForTime(5000, async () => {
3333
const currentUrl = await browser.getCurrentUrl();
3434
const [, currentHash] = decodeURIComponent(currentUrl).split('#');
35-
expect(currentHash).to.contain(expectedRedirect);
35+
// Account for unpredictable location of the g parameter in the search string
36+
expect(currentHash.slice(0, 13)).to.be(expectedRedirectPath);
37+
expect(currentHash.slice(13)).to.contain(expectedSearchString);
3638
});
3739
});
3840
});

0 commit comments

Comments
 (0)