Skip to content

Commit

Permalink
test: querySelector instead of querySelectorAll
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Bijaoui committed Aug 23, 2016
1 parent dfef1f1 commit 136b112
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/unit/specs/fields/fieldNoUiSlider.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ describe("fieldNoUiSlider.vue", () => {
it("should contain an handle element", (done) => {
if (window.noUiSlider) {
vm.$nextTick( () => {
let handle = input.querySelectorAll(".noUi-handle");
expect(handle.length).to.be.equal(1);
expect(handle[0]).to.be.defined;
let handle = input.querySelector(".noUi-handle");
expect(handle).to.be.defined;
// expect(input.classList.contains("noui-target")).to.be.true;
done();
});
Expand All @@ -60,7 +59,7 @@ describe("fieldNoUiSlider.vue", () => {

it.skip("should contain the value", (done) => {
vm.$nextTick( () => {
let origin = input.querySelectorAll(".noUi-origin")[0];
let origin = input.querySelector(".noUi-origin");
expect(origin.style.left).to.be.within("70%", "90%");
done();
});
Expand All @@ -72,7 +71,7 @@ describe("fieldNoUiSlider.vue", () => {

it("handle value should be the model value after changed", (done) => {
vm.$nextTick( () => {
let origin = input.querySelectorAll(".noUi-origin")[0];
let origin = input.querySelector(".noUi-origin");
expect(origin.style.left).to.be.equal("100%");
done();
});
Expand Down

0 comments on commit 136b112

Please sign in to comment.