diff --git a/ui/src/nav.test.tsx b/ui/src/nav.test.tsx
index f2019a8065..b2527d95fb 100644
--- a/ui/src/nav.test.tsx
+++ b/ui/src/nav.test.tsx
@@ -107,6 +107,18 @@ describe('Nav.tsx', () => {
expect(pushMock).toHaveBeenCalledTimes(0)
})
+ it('Does not set args and calls sync when link is opened in a new window', () => {
+ const pushMock = jest.fn()
+ const { getByTitle } = render()
+
+ wave.push = pushMock
+
+ fireEvent.click(getByTitle('Nav 1'), { ctrlKey: true, metaKey: true })
+
+ expect(wave.args['nav1']).toBeUndefined()
+ expect(pushMock).not.toHaveBeenCalled()
+ })
+
it('Sets window location hash when name starts with hash', () => {
const { getByTitle } = render()
fireEvent.click(getByTitle('Nav 1'))
@@ -145,18 +157,6 @@ describe('Nav.tsx', () => {
expect(windowOpenMock).toHaveBeenCalled()
})
- it('Does not set args when link is opened in a new window', () => {
- const pushMock = jest.fn()
- const { getByTitle } = render()
-
- wave.push = pushMock
-
- fireEvent.click(getByTitle('Nav 1'), { ctrlKey: true, metaKey: true })
-
- expect(wave.args['nav1']).not.toBe(true)
- expect(pushMock).not.toHaveBeenCalled()
- })
-
describe('Value update', () => {
it('Sets args on value update', () => {
const props: T.Model = { ...navProps, state: { items } }