Changeset 32692 for gs3-extensions


Ignore:
Timestamp:
2018-12-16T20:18:24+13:00 (5 years ago)
Author:
ak19
Message:

Success in next step: am able to use the shorter component access methods which access a by component by name to repeat the original sample testing code of launching GLI, checking it launched eventually and checking that the Gather pane is selected and has the expected label.

Location:
gs3-extensions/testing/trunk/src/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/testing/trunk/src/src/gstests/tutorials/RunGLITest.java

    r32690 r32692  
    122122
    123123   
    124       // https://joel-costigliola.github.io/assertj/assertj-swing-launch.html
    125       window = findFrame(new GenericTypeMatcher<JFrame>(JFrame.class) {
     124      // https://joel-costigliola.github.io/assertj/assertj-swing-launch.html     
     125      /*window = findFrame(new GenericTypeMatcher<JFrame>(JFrame.class) {
    126126          protected boolean isMatching(JFrame window) {
    127127          return window.getTitle().trim().startsWith(expectedWindowTitle)
     
    129129          }
    130130      }).using(robot());
     131      */
    131132
     133      window = findFrame("GUIManager").using(robot());
    132134       
    133135    String gatherPaneLabel = Dictionary.get("GUI.Gather");
     
    146148        };
    147149    */
     150
     151    JTabbedPaneFixture tab = window.tabbedPane("GUIManager.tab_pane");
     152    /*
    148153    JTabbedPaneFixture tab = window.tabbedPane(new GenericTypeMatcher<JTabbedPane>(JTabbedPane.class) {
    149154        @Override protected boolean isMatching(JTabbedPane tabPane) {
     
    156161        }
    157162        });
     163    */
     164   
    158165    tab.requireSelectedTab(Index.atIndex(1));
    159166    tab.requireTitle(gatherPaneLabel, Index.atIndex(1));
  • gs3-extensions/testing/trunk/src/src/org/greenstone/gsdl3/testing/GSGUITestingUtil.java

    r32690 r32692  
    66// only JUnit and JAssert-Swing, no Selenium in this class
    77import org.junit.Assert;
     8import org.assertj.swing.fixture.*;
    89
    910/*
     
    1516   
    1617   
    17     public static final String DOWNLOAD_PANE = "GUI.Download";
    18     public static final String GATHER_PANE = "GUI.Gather";
    19     public static final String ENRICH_PANE = "GUI.Enrich";
    20     public static final String DESIGN_PANE = "GUI.Design";
    21     public static final String CREATE_PANE = "GUI.Create";
    22     public static final String FORMAT_PANE = "GUI.Format";
     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";
    2324
    2425    /************** NEEDED FOR TESTING *************/
     
    2829
    2930    /************************ GENERAL *******************************/
    30     public static void switchToPane(String pane) {
    31    
     31    //https://joel-costigliola.github.io/assertj/swing/api/org/assertj/swing/fixture/FrameFixture.html
     32    public static void switchToPane(FrameFixture window, String pane) {
     33    //JTabbedPaneFixture tab = window.tabbedPane("GUIManager.tab_pane");
     34    JPanelFixture tab = window.panel(pane);
    3235    }
    3336    public static void getMenu(String menu, String subMenu) {}
Note: See TracChangeset for help on using the changeset viewer.