guy
5 years ago
4 changed files with 265 additions and 1 deletions
@ -0,0 +1,36 @@
|
||||
/** |
||||
* @author windy |
||||
* @version 2.0 |
||||
* Created by windy on 2019/9/12 |
||||
*/ |
||||
describe("intervalSlider", function () { |
||||
|
||||
/** |
||||
* test_author_windy |
||||
*/ |
||||
it("defaultValue", function (done) { |
||||
var intervalSliderLabel = BI.Test.createWidget({ |
||||
type: "bi.interval_slider", |
||||
width: 300, |
||||
unit: "px", |
||||
cls: "layout-bg-white", |
||||
digit: 1 |
||||
}); |
||||
intervalSliderLabel.setMinAndMax({ |
||||
min: 0, |
||||
max: 120 |
||||
}); |
||||
intervalSliderLabel.setValue({ |
||||
min: 10, |
||||
max: 120 |
||||
}); |
||||
intervalSliderLabel.populate(); |
||||
BI.nextTick(function () { |
||||
expect(intervalSliderLabel.element.find(".sign-editor-text").get(0).innerHTML).to.equal("10.0px"); |
||||
expect(intervalSliderLabel.element.find(".sign-editor-text").get(1).innerHTML).to.equal("120.0px"); |
||||
intervalSliderLabel.destroy(); |
||||
done(); |
||||
}); |
||||
}); |
||||
|
||||
}); |
@ -0,0 +1,31 @@
|
||||
/** |
||||
* @author windy |
||||
* @version 2.0 |
||||
* Created by windy on 2019/9/12 |
||||
*/ |
||||
|
||||
|
||||
describe("month", function () { |
||||
|
||||
/** |
||||
* test_author_windy |
||||
*/ |
||||
it("setValue", function () { |
||||
var combo = BI.Test.createWidget({ |
||||
type: "bi.month_combo", |
||||
}); |
||||
combo.setValue(11); |
||||
expect(combo.getValue()).to.equal(11); |
||||
}); |
||||
|
||||
/** |
||||
* test_author_windy |
||||
*/ |
||||
it("getValue", function () { |
||||
var combo = BI.Test.createWidget({ |
||||
type: "bi.month_combo", |
||||
value: 1 |
||||
}); |
||||
expect(combo.getValue()).to.equal(1); |
||||
}); |
||||
}); |
Loading…
Reference in new issue