source: gs3-extensions/testing/trunk/src/src/org/greenstone/gsdl3/testing/GSGUITestingUtil.java@ 32690

Last change on this file since 32690 was 32690, checked in by ak19, 5 years ago

New flag -testing_mode when running GLI only used by the test harness.

File size: 4.1 KB
Line 
1package org.greenstone.gsdl3.testing;
2
3import java.util.Map;
4import java.awt.Component;
5
6// only JUnit and JAssert-Swing, no Selenium in this class
7import org.junit.Assert;
8
9/*
10 *
11*/
12
13public class GSGUITestingUtil
14{
15
16
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";
23
24 /************** NEEDED FOR TESTING *************/
25 // There's now a new method in GLI: GUIManager.setNamesRecursively()
26 // that attempts to recursively call setName() on visible GUI components so that we
27 // can have easier access to those GUI components when testing here through their names
28
29 /************************ GENERAL *******************************/
30 public static void switchToPane(String pane) {
31
32 }
33 public static void getMenu(String menu, String subMenu) {}
34
35 // e.g. pane = Enrich,view=collection; pane = Gather, view = workspace (or collection)
36 public static void getFolderPath(String pane, String view, String folderPath) {}
37 public static void getFilePath(String pane, String view, String filePath) {}
38
39 /**********************FILE MENU*******************************/
40 public static void setPrefs(String tab, Map params) {}
41 // mode e.g. librarian, expert
42 public static void changeUserMode(String mode) {}
43
44 public static void deleteCollection(){}
45 public static void saveCollection(){}
46 public static void closeCollection(){}
47 public static void createCollection(String basedOn) {}
48 public static void loadCollection(String colName) {}
49
50 // only for GS2?
51 public static void exportCollection() {}
52
53 /*************** DESIGN ******************************/
54 public static void changeIndexer(String toIndexer) {}
55 public static void changeDB(String toDB) {}
56
57 public static void configurePartitionIndex(String tab, Map params) {}
58
59 public static void configurePlugin(String pluginName, Map params) {
60 }
61
62 public static void configureClassifier(String classifierName, Map params) {}
63
64 public static void configurePlugout(String plugoutName, Map params) {}
65
66 // https://www.journaldev.com/1257/java-varargs
67 // https://www.geeksforgeeks.org/variable-arguments-varargs-in-java/
68 public static void keepOnlyPlugins(String ... plug_n) {}
69
70 public static void removePlugs(String ... plug_n) {}
71
72 /********************** CREATE PANEL ********************/
73 public static void buildOpenCollection() {}
74 public static void buildOpenCollection(boolean minimalRebuild) {}
75 public static void configureImportOptions(Map params) {}
76 public static void configureBuildOptions(Map params) {}
77
78 public static void buildOutputContains(String ... n) {}
79
80 /******************** GATHER PANE ********************/
81 public static void createWorkspaceShortcut(){}
82
83 // in current open collection
84 public static void createCollectionSubfolder() {}
85
86 public static void dragNDrop(String workspacePath, String collPath) {}
87
88 /********************* ENRICH PANE ******************/
89 // docPath can be just docName or collectionSubfolder/Subfolder2/docName
90 public static void addMeta(String docPath, Map metanamesToValues) {}
91 public static void addFolderLevelMeta(String folderPath, Map metanamesToValues) {}
92
93 /********************* DOWNLOAD PANE ******************/
94 // TODO: more functions needed here: e.g. serverInfo?
95 public static void download(String downloader, Map params) {}
96 public static void clearCache() {}
97 public static String serverInfo() {
98 return "";
99 }
100
101 /********************* DOWNLOAD PANE ******************/
102 public static void formatGeneral(){}
103 public static void formatSearch() {}
104 public static void formatFeature(String featureName, String filename) {}
105 public static boolean isFormatFeatureXMLValid() {
106 return true;
107 }
108
109}
Note: See TracBrowser for help on using the repository browser.