Skip to content

Commit 9a23c05

Browse files
committed
check that pathname has been updated. ignore other parts
1 parent 35d4bc6 commit 9a23c05

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/plugin_functional/test_suites/core_plugins/application_status.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import url from 'url';
20+
import Url from 'url';
2121
import expect from '@kbn/expect';
2222
import {
2323
AppNavLinkStatus,
@@ -28,7 +28,7 @@ import { PluginFunctionalProviderContext } from '../../services';
2828
import '../../plugins/core_app_status/public/types';
2929

3030
const getKibanaUrl = (pathname?: string, search?: string) =>
31-
url.format({
31+
Url.format({
3232
protocol: 'http:',
3333
hostname: process.env.TEST_KIBANA_HOST || 'localhost',
3434
port: process.env.TEST_KIBANA_PORT || '5620',
@@ -115,7 +115,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
115115

116116
await navigateToApp('app_status');
117117
expect(await testSubjects.exists('appStatusApp')).to.eql(true);
118-
expect(await browser.getCurrentUrl()).to.eql(getKibanaUrl('/app/app_status/arbitrary/path'));
118+
const currentUrl = await browser.getCurrentUrl();
119+
expect(Url.parse(currentUrl).pathname).to.eql('/app/app_status/arbitrary/path');
119120
});
120121

121122
it('can change the state of the currently mounted app', async () => {

0 commit comments

Comments
 (0)