/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javafx.scene.control.test.choicebox; import client.test.ScreenshotCheck; import client.test.Smoke; import com.sun.javafx.scene.control.LabeledText; import javafx.collections.ObservableList; import javafx.commons.SortValidator; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; import javafx.scene.control.ChoiceBox; import javafx.scene.control.Label; import javafx.scene.control.ListView; import javafx.scene.control.TextField; import javafx.scene.control.test.ControlsTestBase; import javafx.scene.layout.Pane; import javafx.stage.PopupWindow; import javafx.stage.Window; import javafx.util.StringConverter; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.ByID; import org.jemmy.fx.ByText; import org.jemmy.fx.ByWindowType; import org.jemmy.fx.Root; import org.jemmy.fx.control.CheckBoxWrap; import org.jemmy.fx.control.TextControlWrap; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Selectable; import org.jemmy.interfaces.Selector; import org.jemmy.interfaces.Text; import org.jemmy.lookup.Lookup; import org.jemmy.lookup.LookupCriteria; import org.jemmy.resources.StringComparePolicy; import org.jemmy.timing.State; import static org.junit.Assert.*; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import test.javaclient.shared.FilteredTestRunner; import test.javaclient.shared.screenshots.ScreenshotUtils; /** * * @author shura */ @RunWith(FilteredTestRunner.class) public class ChoiceTest extends ControlsTestBase { static Wrap choice; static Parent scene; static Wrap sceneWrap; static Wrap selection; static Wrap list; static Wrap add; static Text textField; static Wrap getField; static Wrap show; static Wrap hide; static Wrap get; static Wrap converter; static Wrap removeConverter; static Wrap clear; static Wrap reset; static Wrap isShowing; static Wrap propVal; static Wrap propArg1; static Wrap propArg2; static Wrap testPane; public ChoiceTest() { } @BeforeClass public static void setUpClass() throws Exception { ChoiceBoxApp.main(new String[0]); sceneWrap = Root.ROOT.lookup(new ByWindowType(Window.class)).lookup(Scene.class).wrap(); scene = sceneWrap.as(Parent.class, Node.class); choice = scene.lookup(ChoiceBox.class).wrap(); list = scene.lookup(ListView.class).wrap(); selection = scene.lookup(Label.class, new ByID