Skip to content

Commit ee35224

Browse files
fix: test scripts start commands altered
Fixed so all tests are run when using test tag. Removed one tests that failed as the testcase is depreacted. We should know we are writing Vue from now on. Commented out a test that are in progress asap we get our heads around Vuex state changes in tests it will be running again
1 parent f55d59b commit ee35224

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Diff for: package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
"scripts": {
77
"serve": "vue-cli-service serve",
88
"build": "vue-cli-service build",
9-
"test:unit": "vue-cli-service test:unit",
109
"lint": "vue-cli-service lint",
1110
"codecov": "codecov -f coverage/coverage-final.json",
12-
"e2e": "cypress open",
13-
"test": "jest",
14-
"test:jest": "jest"
11+
"test:unit": "jest",
12+
"test:e2e": "npx cypress run",
13+
"test": "npm run test:unit && npm run test:e2e"
1514
},
1615
"dependencies": {
1716
"codecov": "^3.7.0",

Diff for: tests/unit/navbar.spec.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ describe('NavBar', () => {
4848
afterEach(() => {
4949
wrapper.destroy()
5050
})
51-
test('is Vue instance', () => { // this will be depricated
52-
expect(wrapper.isVueInstance()).toBe(true)
53-
})
51+
5452
test('should load app bar', () => {
5553
const bar = wrapper.find('.v-app-bar')
5654
expect(bar.find('.v-toolbar__title').text()).toBe('Ambianic')

Diff for: tests/unit/settings.spec.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,20 @@ describe('NavBar', () => {
5555
})
5656
test('Connection details loaded', () => {
5757
const card = wrapper.find('.v-card')
58-
expect(card.find('.v-card__title').text()).toBe('Connection details')
58+
expect(card.find('.v-card__title').text()).toBe('Ambianic Edge connection details')
5959
expect(card.exists()).toBe(true)
6060
})
6161

62-
test('Connection Status', () => {
62+
/**
63+
* These tests are under construction. Need to mock Edge's in Vuex
64+
*/
65+
// test('Connection Status', () => {
6366

64-
const edgeAddress = '5568ec87-42d8-47b0-aeea-01a125db0623'
65-
// state.pnp.edgeAddress = edgeAddress
67+
// const edgeAddress = '5568ec87-42d8-47b0-aeea-01a125db0623'
68+
// // state.pnp.edgeAddress = edgeAddress
6669

67-
expect(this.mutations.testMutation).toHaveBeenCalledWith({},{})
68-
})
70+
// expect(this.mutations.testMutation).toHaveBeenCalledWith({},{})
71+
// })
6972

7073

7174
// test('should load 5 buttons', () => {

0 commit comments

Comments
 (0)