forked from AkkomaGang/admin-fe
Mock app, nodeInfo and settings api in tests
This commit is contained in:
parent
4eed4d0138
commit
fedb634c48
12 changed files with 27 additions and 6 deletions
|
@ -15,6 +15,7 @@ localVue.use(Element)
|
||||||
jest.mock('@/api/app')
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/invites')
|
jest.mock('@/api/invites')
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
|
||||||
describe('Invite tokens', () => {
|
describe('Invite tokens', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -16,8 +16,10 @@ localVue.use(Vuex)
|
||||||
localVue.use(VueRouter)
|
localVue.use(VueRouter)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
jest.mock('@/api/login')
|
jest.mock('@/api/login')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
|
||||||
describe('Login', () => {
|
describe('Login', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -15,6 +15,7 @@ localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
jest.mock('@/api/app')
|
jest.mock('@/api/app')
|
||||||
|
jest.mock('@/api/nodeInfo')
|
||||||
jest.mock('@/api/reports')
|
jest.mock('@/api/reports')
|
||||||
jest.mock('@/api/settings')
|
jest.mock('@/api/settings')
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,10 @@ const localVue = createLocalVue()
|
||||||
localVue.use(Vuex)
|
localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
|
jest.mock('@/api/app')
|
||||||
|
jest.mock('@/api/nodeInfo')
|
||||||
jest.mock('@/api/reports')
|
jest.mock('@/api/reports')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
|
||||||
describe('Report in a timeline', () => {
|
describe('Report in a timeline', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -12,7 +12,10 @@ const localVue = createLocalVue()
|
||||||
localVue.use(Vuex)
|
localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
|
jest.mock('@/api/app')
|
||||||
|
jest.mock('@/api/nodeInfo')
|
||||||
jest.mock('@/api/reports')
|
jest.mock('@/api/reports')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
|
||||||
describe('Reports filter', () => {
|
describe('Reports filter', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -12,7 +12,10 @@ const localVue = createLocalVue()
|
||||||
localVue.use(Vuex)
|
localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
|
jest.mock('@/api/app')
|
||||||
|
jest.mock('@/api/nodeInfo')
|
||||||
jest.mock('@/api/reports')
|
jest.mock('@/api/reports')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
jest.mock('@/api/status')
|
jest.mock('@/api/status')
|
||||||
|
|
||||||
describe('Status in reports', () => {
|
describe('Status in reports', () => {
|
||||||
|
|
|
@ -14,9 +14,10 @@ localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
jest.mock('@/api/app')
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/status')
|
|
||||||
jest.mock('@/api/peers')
|
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
|
jest.mock('@/api/peers')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
jest.mock('@/api/status')
|
||||||
|
|
||||||
describe('Statuses', () => {
|
describe('Statuses', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -14,9 +14,10 @@ localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
jest.mock('@/api/app')
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/status')
|
|
||||||
jest.mock('@/api/peers')
|
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
|
jest.mock('@/api/peers')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
jest.mock('@/api/status')
|
||||||
|
|
||||||
describe('Statuses', () => {
|
describe('Statuses', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -20,9 +20,10 @@ const $route = {
|
||||||
}
|
}
|
||||||
|
|
||||||
jest.mock('@/api/app')
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/status')
|
|
||||||
jest.mock('@/api/peers')
|
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
|
jest.mock('@/api/peers')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
jest.mock('@/api/status')
|
||||||
jest.mock('@/api/users')
|
jest.mock('@/api/users')
|
||||||
|
|
||||||
describe('Status show page', () => {
|
describe('Status show page', () => {
|
||||||
|
|
|
@ -13,7 +13,9 @@ const localVue = createLocalVue()
|
||||||
localVue.use(Vuex)
|
localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
jest.mock('@/api/users')
|
jest.mock('@/api/users')
|
||||||
|
|
||||||
describe('Apply users actions to multiple users', () => {
|
describe('Apply users actions to multiple users', () => {
|
||||||
|
|
|
@ -22,6 +22,7 @@ const $route = {
|
||||||
jest.mock('@/api/app')
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
jest.mock('@/api/users')
|
jest.mock('@/api/users')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
|
|
||||||
describe('User profile', () => {
|
describe('User profile', () => {
|
||||||
let store
|
let store
|
||||||
|
|
|
@ -13,7 +13,9 @@ const localVue = createLocalVue()
|
||||||
localVue.use(Vuex)
|
localVue.use(Vuex)
|
||||||
localVue.use(Element)
|
localVue.use(Element)
|
||||||
|
|
||||||
|
jest.mock('@/api/app')
|
||||||
jest.mock('@/api/nodeInfo')
|
jest.mock('@/api/nodeInfo')
|
||||||
|
jest.mock('@/api/settings')
|
||||||
jest.mock('@/api/users')
|
jest.mock('@/api/users')
|
||||||
|
|
||||||
describe('Filters users', () => {
|
describe('Filters users', () => {
|
||||||
|
|
Loading…
Reference in a new issue