-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug(*) set proper route on click (#208)
Signed-off-by: Tomasz Wyle台z虈ek <tomwylezek@gmail.com>
- Loading branch information
1 parent
514ff2d
commit c8ab05f
Showing
4 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import renderWithVuex from '@/testUtils/renderWithVuex' | ||
import TestComponent from '@/testUtils/TestComponent.vue' | ||
import NavItem from './NavItem.vue' | ||
|
||
describe('NavItem.vue', () => { | ||
it('renders snapshot with link to selected mesh', async () => { | ||
const { container } = renderWithVuex(NavItem, { | ||
routes: [ | ||
{ | ||
path: '/:mesh/default', | ||
name: 'default', | ||
component: TestComponent, | ||
}, | ||
], | ||
propsData: { | ||
name: 'Default', | ||
link: 'default', | ||
}, | ||
}) | ||
|
||
expect(container).toMatchSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`NavItem.vue renders snapshot with link to selected mesh 1`] = ` | ||
<div> | ||
<div | ||
class="nav-item is-menu-item" | ||
> | ||
<a | ||
class="" | ||
href="#/all/default" | ||
> | ||
<!----> | ||
<div | ||
class="nav-link" | ||
> | ||
Default | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters