mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* the redirect app path should not appear in the browser history * updated jest test to also expect replace * added comment * update jest test
This commit is contained in:
parent
275a4ed103
commit
ba7667ebbf
2 changed files with 15 additions and 7 deletions
|
@ -57,9 +57,12 @@ describe('on page mount', () => {
|
|||
})
|
||||
)}`
|
||||
);
|
||||
expect(spy).toHaveBeenCalledWith({
|
||||
foo: 'bar',
|
||||
});
|
||||
expect(spy).toHaveBeenCalledWith(
|
||||
{
|
||||
foo: 'bar',
|
||||
},
|
||||
{ replace: true }
|
||||
);
|
||||
});
|
||||
|
||||
test('migrates parameters on-the-fly to the latest version', async () => {
|
||||
|
@ -73,9 +76,12 @@ describe('on page mount', () => {
|
|||
})
|
||||
)}`
|
||||
);
|
||||
expect(spy).toHaveBeenCalledWith({
|
||||
num: 2,
|
||||
});
|
||||
expect(spy).toHaveBeenCalledWith(
|
||||
{
|
||||
num: 2,
|
||||
},
|
||||
{ replace: true }
|
||||
);
|
||||
});
|
||||
|
||||
test('throws if locator does not exist', async () => {
|
||||
|
|
|
@ -66,7 +66,9 @@ export class RedirectManager {
|
|||
});
|
||||
|
||||
locator
|
||||
.navigate(migratedParams)
|
||||
.navigate(migratedParams, {
|
||||
replace: true, // We do not want the redirect app URL to appear in browser navigation history
|
||||
})
|
||||
.then()
|
||||
.catch((error) => {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue