mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix test for Settings.vue
This commit is contained in:
parent
5cd847507f
commit
d02b9ab52d
@ -69,15 +69,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
// console.log('submit')
|
||||
},
|
||||
updateTransactions(pagination) {
|
||||
this.$emit('update-transactions', pagination)
|
||||
},
|
||||
// updateTransactions(pagination) {
|
||||
// this.$emit('update-transactions', pagination)
|
||||
// },
|
||||
},
|
||||
created() {
|
||||
this.updateTransactions(0)
|
||||
// this.updateTransactions(0)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
42
frontend/src/pages/Settings.spec.js
Normal file
42
frontend/src/pages/Settings.spec.js
Normal file
@ -0,0 +1,42 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import Settings from './Settings'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
describe('Settings', () => {
|
||||
let wrapper
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
}
|
||||
|
||||
const Wrapper = () => {
|
||||
return shallowMount(Settings, { localVue, mocks })
|
||||
}
|
||||
|
||||
describe('shallow Mount', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('has a user card', () => {
|
||||
expect(wrapper.findComponent({ name: 'UserCard' }).exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
it('has a user first and last name form', () => {
|
||||
expect(wrapper.findComponent({ name: 'UserData' }).exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
it('has a user change language form', () => {
|
||||
expect(wrapper.findComponent({ name: 'UserLanguage' }).exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
it('has a user change password form', () => {
|
||||
expect(wrapper.findComponent({ name: 'UserPassword' }).exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
it('has a user change newsletter form', () => {
|
||||
expect(wrapper.findComponent({ name: 'UserNewsletter' }).exists()).toBeTruthy()
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user