|
|
|
@ -6,7 +6,9 @@
|
|
|
|
|
|
|
|
|
|
describe("multi_select_no_bar_series", function () { |
|
|
|
|
|
|
|
|
|
var _getItemsByTimes = function (items, times) { |
|
|
|
|
var _getItemsByTimes, _itemsCreator, itemSelectorGetter, searchItemSelectorGetter, _hasNextByTimes, items; |
|
|
|
|
before(function () { |
|
|
|
|
_getItemsByTimes = function (items, times) { |
|
|
|
|
var res = []; |
|
|
|
|
for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) { |
|
|
|
|
res.push(items[i]); |
|
|
|
@ -14,11 +16,11 @@ describe("multi_select_no_bar_series", function () {
|
|
|
|
|
return res; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var _hasNextByTimes = function (items, times) { |
|
|
|
|
_hasNextByTimes = function (items, times) { |
|
|
|
|
return times * 100 < items.length; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var _itemsCreator = function (options, callback) { |
|
|
|
|
_itemsCreator = function (options, callback) { |
|
|
|
|
var items = BI.map(BI.makeArray(100, null), function(idx, v) { |
|
|
|
|
return { |
|
|
|
|
text: idx, |
|
|
|
@ -56,18 +58,20 @@ describe("multi_select_no_bar_series", function () {
|
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var itemSelectorGetter = function (array) { |
|
|
|
|
itemSelectorGetter = function (array) { |
|
|
|
|
return BI.map(array, function (idx, num) { |
|
|
|
|
return ".bi-multi-select-popup-view .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")"; |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var searchItemSelectorGetter = function (array) { |
|
|
|
|
searchItemSelectorGetter = function (array) { |
|
|
|
|
return BI.map(array, function (idx, num) { |
|
|
|
|
return ".bi-multi-select-search-pane .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")"; |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* test_author_windy |
|
|
|
|
**/ |
|
|
|
@ -159,7 +163,10 @@ describe("multi_select_no_bar_series", function () {
|
|
|
|
|
type: "bi.multi_select_no_bar_combo", |
|
|
|
|
width: 220, |
|
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
callback(items); |
|
|
|
|
callback({ |
|
|
|
|
items: items, |
|
|
|
|
hasNext: false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
value: [1, 2] |
|
|
|
|
}); |
|
|
|
|