/* * 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.cell; import client.test.Smoke; import com.sun.glass.ui.Application; import com.sun.javafx.scene.control.LabeledText; import java.util.ArrayList; import java.util.List; import javafx.collections.ObservableList; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.control.test.ControlsTestBase; import javafx.scene.control.test.cellapps.CellCustomStringConverter; import javafx.scene.control.test.cellapps.CellsApp; import static javafx.scene.control.test.cellapps.CellsApp.*; import javafx.scene.control.test.cellapps.CellsApp.CellType; import javafx.scene.control.test.cellapps.CellsApp.DataItem; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.ByID; import org.jemmy.fx.ByText; import org.jemmy.fx.Root; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Selectable; import org.jemmy.interfaces.Text; import org.jemmy.lookup.Lookup; import org.jemmy.lookup.LookupCriteria; import org.jemmy.timing.State; import org.junit.After; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; import test.javaclient.shared.FilteredTestRunner; import test.javaclient.shared.Utils; @RunWith(FilteredTestRunner.class) public abstract class CellsTestBase extends ControlsTestBase { protected static Wrap scene = null; protected static Parent parent = null; protected static String cellID = null; protected static String choiceID = null; protected static Wrap testedControl = null; protected static void updateWraps() { scene = Root.ROOT.lookup().wrap(); parent = scene.as(Parent.class, Node.class); } protected abstract Wrap select(String data); protected abstract ObservableList getCurrentProgramValues(); @After public void tearDown() throws InterruptedException { Wrap error = parent.lookup(Label.class, new ByID