UNPKG

@qooxdoo/framework

Version:

The JS Framework for Coders

61 lines (44 loc) 1.5 kB
/* ************************************************************************ qooxdoo - the new era of web development http://qooxdoo.org Copyright: 2004-2008 1&1 Internet AG, Germany, http://www.1und1.de License: MIT: https://opensource.org/licenses/MIT See the LICENSE file in the project's top-level directory for details. Authors: * Alexander Steitz (aback) ************************************************************************ */ qx.Class.define("qx.test.ui.form.AbstractSelectBox", { extend: qx.test.ui.LayoutTestCase, members: { setUp() { this.__selectBox = new qx.ui.form.SelectBox(); this.getRoot().add(this.__selectBox); this.__comboBox = new qx.ui.form.ComboBox(); this.getRoot().add(this.__comboBox); this.flush(); }, tearDown() { super.tearDown(); this.__selectBox.dispose(); this.__selectBox = null; this.__comboBox.dispose(); this.__comboBox = null; }, testStatePopupOpen() { this.__selectBox.open(); this.flush(); this.assertTrue(this.__selectBox.hasState("popupOpen")); this.__selectBox.close(); this.flush(); this.assertFalse(this.__selectBox.hasState("popupOpen")); this.__comboBox.open(); this.flush(); this.assertTrue(this.__comboBox.hasState("popupOpen")); this.__comboBox.close(); this.flush(); this.assertFalse(this.__comboBox.hasState("popupOpen")); } } });