jest test for input publisherId

This commit is contained in:
ogerly 2021-12-01 18:39:25 +01:00
parent c7ab1ee271
commit 31adf5d6e2
2 changed files with 8 additions and 1 deletions

View File

@ -170,6 +170,11 @@ describe('Register', () => {
expect(wrapper.find('#registerCheckbox').exists()).toBeTruthy()
})
it('has PublisherId input fields', () => {
wrapper.find('.publisherCollaps').trigger('click')
expect(wrapper.find('#publisherid').exists()).toBe(true)
})
it('has disabled submit button when not completely filled', () => {
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
})
@ -221,6 +226,7 @@ describe('Register', () => {
wrapper.find('input[name="form.password"]').setValue('Aa123456_')
wrapper.find('input[name="form.passwordRepeat"]').setValue('Aa123456_')
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
wrapper.find('#publisherid').setValue('12345')
})
it('has enabled submit button when completely filled', () => {

View File

@ -121,7 +121,7 @@
{{ messageError }}
</span>
</b-alert>
<b-row v-b-toggle:my-collapse class="text-muted shadow-sm p-3">
<b-row v-b-toggle:my-collapse class="text-muted shadow-sm p-3 publisherCollaps">
<b-col>
{{ $t('publisher.publisherId') }} : {{ $store.state.publisherId }}
</b-col>
@ -137,6 +137,7 @@
<b-icon icon="person-fill"></b-icon>
</b-input-group-prepend>
<b-form-input
id="publisherid"
type="text"
placeholder="Publisher ID"
v-model="publisherId"