Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions tests/unit/specs/components/Stepper.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { createLocalVue, shallowMount } from '@vue/test-utils'
import Buefy from 'buefy'
import Vuex from 'vuex'
import Stepper from '@/components/Stepper'

const localVue = createLocalVue()

localVue.use(Vuex)
localVue.use(Buefy)

describe('Stepper Component Unit Tests', () => {
let wrapper,store

beforeEach(() => {

store = new Vuex.Store({});

wrapper = shallowMount(Stepper, {
mocks: {
$t: key => key
},
store,
localVue,
});
})

afterEach(()=> {
wrapper.destroy()
})

it('Stepper Component is initially rendered correctly', () =>{
expect(wrapper.element).toMatchSnapshot()
})
})
136 changes: 136 additions & 0 deletions tests/unit/specs/components/__snapshots__/Stepper.spec.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Stepper Component Unit Tests Stepper Component is Rendered Correctly 1`] = `
<div
class="stepper-container column"
>
<div
class="step-container current enabled"
>
<div
class="step-header"
>
<h5
class="step-title vocab hb h5b"
>

stepper.FS.question

</h5>
</div>

<firststep-stub
status="current"
stepid="0"
/>

<nav
class="step-navigation"
>
<!---->

<a
class="pagination-next disabled"
role="button"
>
stepper.nav.next-label
</a>
</nav>
</div>
<div
class="step-container inactive enabled"
>
<div
class="step-header"
>
<h5
class="step-title vocab hb h5b"
>

stepper.BY.heading

</h5>
</div>

<!---->

<!---->
</div>
<div
class="step-container inactive enabled"
>
<div
class="step-header"
>
<h5
class="step-title vocab hb h5b"
>

stepper.NC.heading

</h5>
</div>

<!---->

<!---->
</div>
<div
class="step-container inactive enabled"
>
<div
class="step-header"
>
<h5
class="step-title vocab hb h5b"
>

stepper.ND.heading

</h5>
</div>

<!---->

<!---->
</div>
<div
class="step-container inactive enabled"
>
<div
class="step-header"
>
<h5
class="step-title vocab hb h5b"
>

stepper.SA.heading

</h5>
</div>

<!---->

<!---->
</div>
<div
class="step-container inactive enabled"
>
<div
class="step-header"
>
<h5
class="step-title vocab hb h5b"
>

stepper.AD.heading

</h5>
</div>

<!---->

<!---->
</div>
</div>
`;