mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add test - enable disable button on submit register
This commit is contained in:
parent
1a42aa17e4
commit
a8faa7b51b
@ -99,7 +99,7 @@ describe('Register', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('has disabled submit button when not completely filled', () => {
|
it('has disabled submit button when not completely filled', () => {
|
||||||
expect(wrapper.find('button[type="submit"]').is('[disabled]')).toBe(true)
|
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('displays a message that Email is required', async () => {
|
it('displays a message that Email is required', async () => {
|
||||||
@ -137,6 +137,10 @@ describe('Register', () => {
|
|||||||
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('has enabled submit button when completely filled', () => {
|
||||||
|
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
|
||||||
|
})
|
||||||
|
|
||||||
describe('server sends back error', () => {
|
describe('server sends back error', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
registerUserMutationMock.mockRejectedValue({ message: 'Ouch!' })
|
registerUserMutationMock.mockRejectedValue({ message: 'Ouch!' })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user