Fix 'setWidget' action for the case a widget was closed instead of minimized
Change-Id: I74339e444fcca43aee3c694c2a24fe7e68980d81
diff --git a/dev/js/spec/pluginSpec.js b/dev/js/spec/pluginSpec.js
index 36d6f64..5cd7ce5 100644
--- a/dev/js/spec/pluginSpec.js
+++ b/dev/js/spec/pluginSpec.js
@@ -227,6 +227,16 @@
expect(p.element().querySelectorAll("iframe").length).toEqual(1);
expect(p.element().querySelectorAll("div.view.widget").length).toEqual(1);
expect(p.element().querySelectorAll("div.view.show.widget").length).toEqual(0);
+
+ p.element().querySelector("span.close").click();
+
+ expect(p.element().querySelectorAll("iframe").length).toEqual(0);
+
+ b.click();
+
+ expect(p.element().querySelectorAll("iframe").length).toEqual(1);
+ expect(p.element().querySelectorAll("div.view.widget").length).toEqual(1);
+ expect(p.element().querySelectorAll("div.view.show.widget").length).toEqual(1);
manager.destroy();