mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-30 20:42:34 +02:00
Add enabling/disabling e2e tests
This commit is contained in:
parent
7e5a233086
commit
2324827bbe
|
@ -33,6 +33,9 @@
|
|||
<label for="choices-basic">Basic</label>
|
||||
<button class="open-dropdown push-bottom">Open dropdown</button>
|
||||
<button class="close-dropdown push-bottom">Close dropdown</button>
|
||||
<button class="toggle-dropdown push-bottom">Toggle dropdown</button>
|
||||
<button class="disable push-bottom">Disable</button>
|
||||
<button class="enable push-bottom">Enable</button>
|
||||
<select class="form-control" name="choices-basic" id="choices-basic" multiple>
|
||||
<option value="Choice 1">Choice 1</option>
|
||||
<option value="Choice 2">Choice 2</option>
|
||||
|
@ -187,6 +190,18 @@
|
|||
choicesBasic.hideDropdown();
|
||||
});
|
||||
|
||||
document.querySelector('button.toggle-dropdown').addEventListener('click', () => {
|
||||
choicesBasic.toggleDropdown();
|
||||
});
|
||||
|
||||
document.querySelector('button.disable').addEventListener('click', () => {
|
||||
choicesBasic.disable();
|
||||
});
|
||||
|
||||
document.querySelector('button.enable').addEventListener('click', () => {
|
||||
choicesBasic.enable();
|
||||
});
|
||||
|
||||
new Choices('#choices-remove-button', {
|
||||
removeItemButton: true,
|
||||
});
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
<label for="choices-basic">Basic</label>
|
||||
<button class="open-dropdown push-bottom">Open dropdown</button>
|
||||
<button class="close-dropdown push-bottom">Close dropdown</button>
|
||||
<button class="toggle-dropdown push-bottom">Toggle dropdown</button>
|
||||
<button class="disable push-bottom">Disable</button>
|
||||
<button class="enable push-bottom">Enable</button>
|
||||
<select class="form-control" name="choices-basic" id="choices-basic">
|
||||
<option value="Choice 1">Choice 1</option>
|
||||
<option value="Choice 2">Choice 2</option>
|
||||
|
@ -191,6 +194,18 @@
|
|||
choicesBasic.hideDropdown();
|
||||
});
|
||||
|
||||
document.querySelector('button.toggle-dropdown').addEventListener('click', () => {
|
||||
choicesBasic.toggleDropdown(true);
|
||||
});
|
||||
|
||||
document.querySelector('button.disable').addEventListener('click', () => {
|
||||
choicesBasic.disable();
|
||||
});
|
||||
|
||||
document.querySelector('button.enable').addEventListener('click', () => {
|
||||
choicesBasic.enable();
|
||||
});
|
||||
|
||||
new Choices('#choices-remove-button', {
|
||||
removeItemButton: true,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue