-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ee298d
commit 76cfbfe
Showing
2 changed files
with
78 additions
and
1 deletion.
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
66 changes: 66 additions & 0 deletions
66
tests/unit/views/Tasks/QualifyingTests/QualifyingTest/Review.spec.js
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,66 @@ | ||
import Review from '@/views/Exercises/Tasks/QualifyingTests/QualifyingTest/Review.vue'; | ||
import { createTestSubject } from '@/../tests/unit/helpers'; | ||
|
||
const mockTestQuestions = { | ||
introduction: 'Hello', | ||
questions: [ | ||
{ | ||
type: 'critical-analysis', | ||
details: 'I am the first question', | ||
options: [ | ||
'I am the first option', | ||
'I am the second option', | ||
'I am the third option', | ||
'I am the fourth option', | ||
], | ||
'correct': 0, | ||
}, | ||
], | ||
}; | ||
|
||
const mockQualifyingTest = { | ||
title: 'mockQtTitle', | ||
id: '1111', | ||
mode: 'mode', | ||
type: 'critical-analysis', | ||
status: 'started', | ||
startDate: new Date('111'), | ||
endDate: new Date('222'), | ||
testDuration: 222, | ||
additionalInstructions: [ | ||
{ | ||
text: 'one', | ||
}, | ||
{ | ||
text: 'two', | ||
}, | ||
], | ||
testQuestions: mockTestQuestions, | ||
}; | ||
|
||
describe('@/views/Exercises/Tasks/QualifyingTests/QualifyingTest/Review', () => { | ||
|
||
describe('component instance', () => { | ||
let wrapper; | ||
|
||
beforeEach(() => { | ||
wrapper = createTestSubject(Review, { | ||
mocks: {}, | ||
stubs: [], | ||
propsData: { | ||
}, | ||
}); | ||
wrapper.vm.$store.state.qualifyingTest.record = mockQualifyingTest; | ||
}); | ||
|
||
describe('template', () => { | ||
it('renders the component', () => { | ||
console.log(wrapper.html()); | ||
expect(wrapper.exists()).toBe(true); | ||
}); | ||
}); | ||
|
||
}); | ||
|
||
}); | ||
|