mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-16 09:54:32 +00:00
refactor tests for submit button beforeEach
This commit is contained in:
parent
0256ab937b
commit
793e10683e
@ -214,26 +214,20 @@ describe('Register', () => {
|
||||
})
|
||||
*/
|
||||
|
||||
describe('API calls when form is missing', () => {
|
||||
it('has disabled submit button when missing checked box', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.find('#registerFirstname').setValue('Max')
|
||||
wrapper.find('#registerLastname').setValue('Mustermann')
|
||||
wrapper.find('#Email-input-field').setValue('max.mustermann@gradido.net')
|
||||
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
||||
wrapper.find('#publisherid').setValue('12345')
|
||||
})
|
||||
describe('API calls when form is missing input', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.find('#registerFirstname').setValue('Max')
|
||||
wrapper.find('#registerLastname').setValue('Mustermann')
|
||||
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
||||
wrapper.find('#publisherid').setValue('12345')
|
||||
})
|
||||
it('has disabled submit button when missing input checked box', () => {
|
||||
wrapper.find('#Email-input-field').setValue('max.mustermann@gradido.net')
|
||||
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
|
||||
})
|
||||
|
||||
it('has disabled submit button when missing email input', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.find('#registerFirstname').setValue('Max')
|
||||
wrapper.find('#registerLastname').setValue('Mustermann')
|
||||
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
||||
wrapper.find('#publisherid').setValue('12345')
|
||||
wrapper.find('#registerCheckbox').setChecked()
|
||||
})
|
||||
wrapper.find('#registerCheckbox').setChecked()
|
||||
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user