Changeset 32694
- Timestamp:
- 2018-12-16T20:36:15+13:00 (5 years ago)
- Location:
- gs3-extensions/testing/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/testing/trunk/src/build.xml
r32688 r32694 7 7 <property name="gli.home" value="${env.GSDL3SRCHOME}/gli"/> 8 8 9 <target name="build-util-jar" >9 <target name="build-util-jar" depends="needs-gs3-setup, needs-make-gli-jar"> 10 10 <mkdir dir="${basedir}/build"/> 11 11 <javac srcdir="${basedir}/src" … … 16 16 <include name="*.jar"/> 17 17 </fileset> 18 <fileset dir="${gli.home}"> 19 <include name="GLI.jar"/> 20 </fileset> 18 21 </classpath> 19 22 <include name="org/greenstone/gsdl3/testing/*.java"/> -
gs3-extensions/testing/trunk/src/src/gstests/tutorials/RunGLITest.java
r32693 r32694 68 68 import static org.assertj.swing.launcher.ApplicationLauncher.*; 69 69 import static org.assertj.swing.finder.WindowFinder.findFrame; 70 71 import static org.greenstone.gsdl3.testing.GSGUITestingUtil.*; 70 72 71 73 public class RunGLITest extends AssertJSwingJUnitTestCase { … … 140 142 tab.requireSelectedTab(Index.atIndex(1)); 141 143 tab.requireTitle(gatherPaneLabel, Index.atIndex(1)); 144 145 // attempt to switch to enrich pane, uses static methods of GSGUITestingUtil 146 // through static import of that class 147 switchToPane(window, DOWNLOAD_PANE); 148 142 149 } 143 150 -
gs3-extensions/testing/trunk/src/src/org/greenstone/gsdl3/testing/GSGUITestingUtil.java
r32693 r32694 8 8 import org.assertj.swing.fixture.*; 9 9 10 // GLI imports 11 import org.greenstone.gatherer.Gatherer; 12 import org.greenstone.gatherer.GathererProg; // main GLI class we'll be testing 13 import org.greenstone.gatherer.Dictionary; // access to display strings 14 10 15 /* 11 * 16 * Utility class containing helper functions for GLI GUI testing using AsssertJ Swing 12 17 */ 13 18 14 19 public class GSGUITestingUtil 15 { 20 { 21 public static final String DOWNLOAD_PANE = "GUI.Download"; 22 public static final String GATHER_PANE = "GUI.Gather"; 23 public static final String ENRICH_PANE = "GUI.Enrich"; 24 public static final String DESIGN_PANE = "GUI.Design"; 25 public static final String CREATE_PANE = "GUI.Create"; 26 public static final String FORMAT_PANE = "GUI.Format"; 16 27 17 18 public static final String DOWNLOAD_PANE = "DownloadPane";19 public static final String GATHER_PANE = "GatherPane";20 public static final String ENRICH_PANE = "EnrichPane";21 public static final String DESIGN_PANE = "DesignPane";22 public static final String CREATE_PANE = "CreatePane";23 public static final String FORMAT_PANE = "FormatPane";24 25 28 /************** NEEDED FOR TESTING *************/ 26 29 // There's now a new method in GLI: GUIManager.setNamesRecursively() … … 31 34 //https://joel-costigliola.github.io/assertj/swing/api/org/assertj/swing/fixture/FrameFixture.html 32 35 public static void switchToPane(FrameFixture window, String pane) { 33 //JTabbedPaneFixture tab = window.tabbedPane("GUIManager.tab_pane"); 34 JPanelFixture tab = window.panel(pane); 36 String paneLabel = Dictionary.get(pane); // e.g. GUI.Enrich 37 //JPanelFixture tab = window.panel(pane); // this just gets us the JPanel of controls within 38 JTabbedPaneFixture tab = window.tabbedPane("GUIManager.tab_pane"); 39 tab.selectTab(paneLabel); // select tab by its title 35 40 } 36 41 public static void getMenu(String menu, String subMenu) {}
Note:
See TracChangeset
for help on using the changeset viewer.