forked from wearebraid/vue-formulate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experimentally add j0ber's fix for removeRepeatable events
See wearebraid#432 for details. At time of writing the PR was still open and unapproved.
- Loading branch information
1 parent
829ad02
commit 3574d80
Showing
6 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -859,7 +859,8 @@ describe('FormulateInputGroup', () => { | |
value: [{ username: 'mermaid', email: '[email protected]' }, { username: 'blah', email: '[email protected]' }], | ||
}, | ||
listeners: { | ||
'repeatableRemoved': removeListener | ||
'repeatableRemoved': removeListener, | ||
'repeatable-removed': removeListener | ||
}, | ||
slots: { | ||
default: ` | ||
|
@@ -871,7 +872,7 @@ describe('FormulateInputGroup', () => { | |
await flushPromises() | ||
wrapper.find('.formulate-input-group-repeatable-remove').trigger('click') | ||
await flushPromises() | ||
expect(removeListener.mock.calls.length).toBe(1) | ||
expect(removeListener.mock.calls.length).toBe(2) | ||
}) | ||
|
||
it('allows passing errors down into groups', async () => { | ||
|
@@ -884,7 +885,8 @@ describe('FormulateInputGroup', () => { | |
value: [{}], | ||
}, | ||
listeners: { | ||
'repeatableAdded': addListener | ||
'repeatableAdded': addListener, | ||
'repeatable-added': addListener | ||
}, | ||
slots: { | ||
default: ` | ||
|
@@ -896,7 +898,7 @@ describe('FormulateInputGroup', () => { | |
await flushPromises() | ||
wrapper.find('.formulate-input-group-add-more button').trigger('click') | ||
await flushPromises() | ||
expect(addListener.mock.calls.length).toBe(1) | ||
expect(addListener.mock.calls.length).toBe(2) | ||
}) | ||
|
||
it('ensures there are always a minimum number of items even if the model has fewer', async () => { | ||
|