mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
add test ConfirmRegisterMailFormular.spec.js
This commit is contained in:
parent
ea4b74e051
commit
578f4835b1
40
admin/src/components/ConfirmRegisterMailFormular.spec.js
Normal file
40
admin/src/components/ConfirmRegisterMailFormular.spec.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import ConfirmRegisterMailFormular from './ConfirmRegisterMailFormular.vue'
|
||||||
|
|
||||||
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
const mocks = {
|
||||||
|
$moment: jest.fn(() => {
|
||||||
|
return {
|
||||||
|
format: jest.fn((m) => m),
|
||||||
|
subtract: jest.fn(() => {
|
||||||
|
return {
|
||||||
|
format: jest.fn((m) => m),
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
|
const propsData = {
|
||||||
|
email: '',
|
||||||
|
dateLastSend: '',
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('ConfirmRegisterMailFormular', () => {
|
||||||
|
let wrapper
|
||||||
|
|
||||||
|
const Wrapper = () => {
|
||||||
|
return mount(ConfirmRegisterMailFormular, { localVue, mocks, propsData })
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('mount', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper = Wrapper()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('has a DIV element with the class.component-confirm-register-mail', () => {
|
||||||
|
expect(wrapper.find('.component-confirm-register-mail').exists()).toBeTruthy()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<b-input-group prepend="Email bestätigen, wiederholt senden an:" class="mt-3">
|
<b-input-group prepend="Email bestätigen, wiederholt senden an:" class="mt-3">
|
||||||
<b-form-input readonly :value="email"></b-form-input>
|
<b-form-input readonly :value="email"></b-form-input>
|
||||||
<b-input-group-append>
|
<b-input-group-append>
|
||||||
<b-button variant="outline-success" @click="sendRegisterMail">
|
<b-button variant="outline-success" class="test-button" @click="sendRegisterMail">
|
||||||
Registrierungs-Email bestätigen, jetzt senden
|
Registrierungs-Email bestätigen, jetzt senden
|
||||||
</b-button>
|
</b-button>
|
||||||
</b-input-group-append>
|
</b-input-group-append>
|
||||||
@ -32,15 +32,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
sendRegisterMail() {
|
sendRegisterMail() {
|
||||||
alert(
|
// eslint-disable-next-line no-console
|
||||||
'sende wiederholt den ConfirmText an die register E-Mail (' + this.email + ') des User!',
|
console.log('sende wiederholt den ConfirmText an die register E-Mail des User!')
|
||||||
)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user