mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
check that pathname has been updated. ignore other parts (#73689)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
6bfd4e6af3
commit
896e87a7ce
1 changed files with 4 additions and 3 deletions
|
@ -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 () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue