From e754eb77b3df00688f711781bc9ba29662d36c4e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 27 Apr 2020 11:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E8=A1=A5?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E6=98=A8=E5=A4=A9=E4=BF=AE=E6=94=B9=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=8B=89=E7=9A=84=E5=8D=95=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combo.valuechooser.insert.test.js | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/component/valuechooser/__test__/combo.valuechooser.insert.test.js b/src/component/valuechooser/__test__/combo.valuechooser.insert.test.js index e3fbc10d4..b57d60c3d 100644 --- a/src/component/valuechooser/__test__/combo.valuechooser.insert.test.js +++ b/src/component/valuechooser/__test__/combo.valuechooser.insert.test.js @@ -190,4 +190,49 @@ describe("value_chooser_insert_combo", function () { }, 300); }); }); + + /** + * test_author_windy + **/ + it("BI-64399", function (done) { + var widget = BI.Test.createWidget({ + type: "bi.value_chooser_insert_combo", + width: 220, + itemsCreator: function (op, callback) { + callback([{ + text: "A", + value: "A", + title: "A" + }, { + text: "AA", + value: "AA", + title: "AA" + }, { + text: "a1", + value: "a1", + title: "a1" + }]); + } + }); + + widget.element.find(".bi-multi-select-trigger").click(); + // 为什么要delay 300呢,因为按钮有debounce + BI.delay(function () { + // 点选a1 + BI.each(itemSelectorGetter([3]), function (idx, selector) { + widget.element.find(selector).click(); + }); + widget.element.find(".bi-multi-select-trigger .tip-text-style").click(); + // 这边为啥要加呢,因为input的setValue中有nextTick + BI.nextTick(function () { + BI.Test.triggerKeyDown(widget.element.find(".bi-multi-select-trigger .bi-input"), "A", 65, function () { + BI.nextTick(function () { + expect(widget.element.find(".bi-multi-select-search-pane .multi-select-toolbar").css("display")).to.equal("block"); + widget.destroy(); + done(); + }); + }); + }); + }, 300); + }); }); \ No newline at end of file