Skip to content

Commit

Permalink
check that pathname has been updated. ignore other parts (#73689)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
mshustov and elasticmachine committed Jul 30, 2020
1 parent 6bfd4e6 commit 896e87a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import url from 'url';
import Url from 'url';
import expect from '@kbn/expect';
import {
AppNavLinkStatus,
Expand All @@ -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',
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit 896e87a

Please sign in to comment.