From 28bd06607014d8d0eaea26f348564fe93d636bb8 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Thu, 30 Jul 2020 09:51:56 +0300 Subject: [PATCH] check that pathname has been updated. ignore other parts (#73689) Co-authored-by: Elastic Machine --- .../test_suites/core_plugins/application_status.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/plugin_functional/test_suites/core_plugins/application_status.ts b/test/plugin_functional/test_suites/core_plugins/application_status.ts index a4c2db733b8949..f56a6e8d62fb12 100644 --- a/test/plugin_functional/test_suites/core_plugins/application_status.ts +++ b/test/plugin_functional/test_suites/core_plugins/application_status.ts @@ -17,7 +17,7 @@ * under the License. */ -import url from 'url'; +import Url from 'url'; import expect from '@kbn/expect'; import { AppNavLinkStatus, @@ -28,7 +28,7 @@ import { PluginFunctionalProviderContext } from '../../services'; import '../../plugins/core_app_status/public/types'; const getKibanaUrl = (pathname?: string, search?: string) => - url.format({ + Url.format({ protocol: 'http:', hostname: process.env.TEST_KIBANA_HOST || 'localhost', port: process.env.TEST_KIBANA_PORT || '5620', @@ -115,7 +115,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide await navigateToApp('app_status'); expect(await testSubjects.exists('appStatusApp')).to.eql(true); - expect(await browser.getCurrentUrl()).to.eql(getKibanaUrl('/app/app_status/arbitrary/path')); + const currentUrl = await browser.getCurrentUrl(); + expect(Url.parse(currentUrl).pathname).to.eql('/app/app_status/arbitrary/path'); }); it('can change the state of the currently mounted app', async () => {