Skip to content

Commit

Permalink
fix vue-multiselect test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Jan 30, 2017
1 parent 593307b commit 2aacb57
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/fields/fieldVueMultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:options="options",
:multiple="schema.multiSelect",
:value="value",
:key="selectOptions.key || null",
:track-by="selectOptions.trackBy || null",
:label="selectOptions.label || null",
:searchable="selectOptions.searchable",
:local-search="selectOptions.localSearch",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function(config) {
"https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.js",
"https://cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.js",
"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.4/js/ion.rangeSlider.js",
"https://rawgit.com/monterail/vue-multiselect/v1.1.4/lib/vue-multiselect.min.js",
"https://unpkg.com/vue-multiselect@2.0.0-beta.13",
"https://rawgit.com/nosir/cleave.js/master/dist/cleave.js",
"https://nosir.github.io/cleave.js/lib/cleave-phone.i18n.js",
"https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/8.5.1/nouislider.js",
Expand Down
14 changes: 7 additions & 7 deletions test/unit/specs/fields/fieldVueMultiSelect.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function createField(test, schema = {}, model = null, disabled = false, options)
[ el, vm, field ] = createVueField(test, "fieldVueMultiSelect", schema, model, disabled, options);
}

describe.skip("fieldVueMultiSelect.vue", function() {
describe("fieldVueMultiSelect.vue", function() {

describe("check template", () => {
let schema = {
Expand Down Expand Up @@ -48,7 +48,7 @@ describe.skip("fieldVueMultiSelect.vue", function() {
});

it("should contain option elements", () => {
let options = input.querySelectorAll("li.multiselect__option");
let options = input.querySelectorAll("li.multiselect__element .multiselect__option");
expect(options.length).to.be.equal(schema.values.length);
expect(options[1].querySelector("span").textContent).to.be.equal("Paris");
expect(options[1].classList.contains("multiselect__option--selected")).to.be.true;
Expand All @@ -66,8 +66,8 @@ describe.skip("fieldVueMultiSelect.vue", function() {
it("input value should be the model value after changed", (done) => {
model.city = "Rome";
vm.$nextTick( () => {
expect(input.querySelectorAll("li.multiselect__option--selected").length).to.be.equal(1);
let options = input.querySelectorAll("li.multiselect__option");
expect(input.querySelectorAll("li .multiselect__option--selected").length).to.be.equal(1);
let options = input.querySelectorAll("li .multiselect__option");
expect(options[2].querySelector("span").textContent).to.be.equal("Rome");
expect(options[2].classList.contains("multiselect__option--selected")).to.be.true;
done();
Expand All @@ -77,8 +77,8 @@ describe.skip("fieldVueMultiSelect.vue", function() {
it("input value should be the model value after changed (multiselection)", (done) => {
model.city = ["Paris","Rome"];
vm.$nextTick( () => {
expect(input.querySelectorAll("li.multiselect__option--selected").length).to.be.equal(2);
let options = input.querySelectorAll("li.multiselect__option");
expect(input.querySelectorAll("li .multiselect__option--selected").length).to.be.equal(2);
let options = input.querySelectorAll("li .multiselect__option");
expect(options[1].querySelector("span").textContent).to.be.equal("Paris");
expect(options[1].classList.contains("multiselect__option--selected")).to.be.true;
expect(options[2].querySelector("span").textContent).to.be.equal("Rome");
Expand All @@ -88,7 +88,7 @@ describe.skip("fieldVueMultiSelect.vue", function() {
});

it("model value should be the input value if changed", (done) => {
let options = input.querySelectorAll("li.multiselect__option");
let options = input.querySelectorAll("li .multiselect__option");
trigger(options[2], "mousedown");

vm.$nextTick( () => {
Expand Down

0 comments on commit 2aacb57

Please sign in to comment.