fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
1.3 KiB

/**
* @author windy
* @version 2.0
* Created by windy on 2020/3/9
*/
describe("MessageTest", function () {
/**
* test_author_windy
*/
it("alert", function (done) {
BI.Msg.alert("message", "ASASASASA");
var body = BI.Widget._renderEngine.createElement("body");
expect(body.find(".bi-message-depend").length).to.equal(1);
BI.nextTick(function () {
body.find(".bi-message-depend .bi-button").click();
expect(body.find(".bi-message-depend").length).to.equal(0);
done();
});
});
/**
* test_author_windy
*/
it("toast_hand_close", function (done) {
BI.Msg.toast("message", {
autoClose: false,
});
var body = BI.Widget._renderEngine.createElement("body");
expect(body.find(".bi-toast").length).to.equal(1);
BI.nextTick(function () {
body.find(".bi-toast .bi-icon-button").click();
expect(body.find(".bi-toast").length).to.equal(0);
done();
});
});
/**
* test_author_windy
*/
it("toast_auto_close", function () {
BI.Msg.toast("message");
var body = BI.Widget._renderEngine.createElement("body");
expect(body.find(".bi-toast").length).to.equal(1);
});
});