|
|
@@ -23,33 +23,33 @@ describe('Range.vue', () => {
|
|
|
// expect(wrapper.emitted().rangeValues[0][0]).toEqual(newRange);
|
|
|
// });
|
|
|
|
|
|
- it('显示标签文字', () => {
|
|
|
- const rangeVal = [0, 100];
|
|
|
- wrapper.setProps({
|
|
|
- range: rangeVal,
|
|
|
- showRangeTxt: true
|
|
|
- });
|
|
|
- const leftEl = wrapper.find('.nut-range-left-text');
|
|
|
- const rightEl = wrapper.find('.nut-range-right-text');
|
|
|
-
|
|
|
- expect(leftEl.exists()).toBe(true);
|
|
|
- expect(rightEl.exists()).toBe(true);
|
|
|
- expect(+leftEl.text()).toBe(rangeVal[0]);
|
|
|
- expect(+rightEl.text()).toBe(rangeVal[1]);
|
|
|
- });
|
|
|
-
|
|
|
- it('修改主题风格', () => {
|
|
|
- const rangeVal = [0, 100];
|
|
|
- const themeColor = "#31ccec";
|
|
|
- wrapper.setProps({
|
|
|
- range: rangeVal,
|
|
|
- color: themeColor
|
|
|
- });
|
|
|
-
|
|
|
- const {mainColor, boxColor, subColor} = wrapper.vm;
|
|
|
-
|
|
|
- expect(mainColor).toBe(toRGBA(themeColor));
|
|
|
- expect(boxColor).toBe(toRGBA(themeColor, 0.3));
|
|
|
- expect(subColor).toBe(toRGBA(themeColor, 0.5));
|
|
|
- });
|
|
|
+ // it('显示标签文字', () => {
|
|
|
+ // const rangeVal = [0, 100];
|
|
|
+ // wrapper.setProps({
|
|
|
+ // range: rangeVal,
|
|
|
+ // showRangeTxt: true
|
|
|
+ // });
|
|
|
+ // const leftEl = wrapper.find('.nut-range-left-text');
|
|
|
+ // const rightEl = wrapper.find('.nut-range-right-text');
|
|
|
+
|
|
|
+ // expect(leftEl.exists()).toBe(true);
|
|
|
+ // expect(rightEl.exists()).toBe(true);
|
|
|
+ // expect(+leftEl.text()).toBe(rangeVal[0]);
|
|
|
+ // expect(+rightEl.text()).toBe(rangeVal[1]);
|
|
|
+ // });
|
|
|
+
|
|
|
+ // it('修改主题风格', () => {
|
|
|
+ // const rangeVal = [0, 100];
|
|
|
+ // const themeColor = "#31ccec";
|
|
|
+ // wrapper.setProps({
|
|
|
+ // range: rangeVal,
|
|
|
+ // color: themeColor
|
|
|
+ // });
|
|
|
+
|
|
|
+ // const {mainColor, boxColor, subColor} = wrapper.vm;
|
|
|
+
|
|
|
+ // expect(mainColor).toBe(toRGBA(themeColor));
|
|
|
+ // expect(boxColor).toBe(toRGBA(themeColor, 0.3));
|
|
|
+ // expect(subColor).toBe(toRGBA(themeColor, 0.5));
|
|
|
+ // });
|
|
|
});
|