mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add data-test properties to buttons
This commit is contained in:
parent
14360fb8af
commit
140a374291
@ -138,15 +138,19 @@ describe('ContributionForm', () => {
|
||||
|
||||
describe('has button', () => {
|
||||
it('reset enabled', () => {
|
||||
expect(wrapper.find('button[type="reset"]').attributes('disabled')).toBeFalsy()
|
||||
expect(
|
||||
wrapper.find('button[data-test="button-cancel"]').attributes('disabled'),
|
||||
).toBeFalsy()
|
||||
})
|
||||
|
||||
it('submit enabled', () => {
|
||||
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBeFalsy()
|
||||
it.only('submit enabled', () => {
|
||||
expect(
|
||||
wrapper.find('button[data-test="button-submit"]').attributes('disabled'),
|
||||
).toBeFalsy()
|
||||
})
|
||||
})
|
||||
|
||||
describe.only('on trigger submit', () => {
|
||||
describe.skip('on trigger submit', () => {
|
||||
beforeEach(async () => {
|
||||
// await wrapper.find('.test-submit').trigger('click')
|
||||
// await wrapper.find('button[type="submit"]').trigger('click')
|
||||
|
||||
@ -68,12 +68,12 @@
|
||||
</div>
|
||||
<b-row class="mt-3">
|
||||
<b-col>
|
||||
<b-button class="test-cancel" type="reset" variant="secondary" @click="reset">
|
||||
<b-button type="reset" variant="secondary" @click="reset" data-test="button-cancel">
|
||||
{{ $t('form.cancel') }}
|
||||
</b-button>
|
||||
</b-col>
|
||||
<b-col class="text-right">
|
||||
<b-button class="test-submit" type="submit" variant="primary" :disabled="disabled">
|
||||
<b-button type="submit" variant="primary" :disabled="disabled" data-test="button-submit">
|
||||
{{ form.id ? $t('form.change') : $t('contribution.submit') }}
|
||||
</b-button>
|
||||
</b-col>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user