git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ac4209
)
JAL-3038 unit test updates for JalviewJS workaround hack
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 17 Aug 2018 10:38:33 +0000
(11:38 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 17 Aug 2018 10:38:33 +0000
(11:38 +0100)
src/jalview/io/cache/JvCacheableInputBox.java
patch
|
blob
|
history
test/jalview/fts/service/pdb/PDBFTSPanelTest.java
patch
|
blob
|
history
test/jalview/io/cache/JvCacheableInputBoxTest.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/cache/JvCacheableInputBox.java
b/src/jalview/io/cache/JvCacheableInputBox.java
index
5e79393
..
d2ad8de
100644
(file)
--- a/
src/jalview/io/cache/JvCacheableInputBox.java
+++ b/
src/jalview/io/cache/JvCacheableInputBox.java
@@
-379,4
+379,12
@@
public class JvCacheableInputBox<E>
}
}
}
}
+ public void addItem(String item)
+ {
+ if (!Jalview.isJS())
+ {
+ comboBox.addItem(item);
+ }
+ }
+
}
}
diff --git
a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java
b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java
index
9912e44
..
224a712
100644
(file)
--- a/
test/jalview/fts/service/pdb/PDBFTSPanelTest.java
+++ b/
test/jalview/fts/service/pdb/PDBFTSPanelTest.java
@@
-33,6
+33,8
@@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class PDBFTSPanelTest
{
public class PDBFTSPanelTest
{
@@
-103,12
+105,13
@@
public class PDBFTSPanelTest
{
PDBFTSPanel searchPanel = new PDBFTSPanel(null);
JInternalFrame mainFrame = searchPanel.getMainFrame();
{
PDBFTSPanel searchPanel = new PDBFTSPanel(null);
JInternalFrame mainFrame = searchPanel.getMainFrame();
- JComboBox<String> txt_search = searchPanel.getTxtSearch();
+// JComboBox<String> txt_search = PA.gsearchPanel.getTxtSearch();
assertTrue(mainFrame.getTitle().length() == 20);
assertTrue(mainFrame.getTitle()
.equalsIgnoreCase("PDB Sequence Fetcher"));
assertTrue(mainFrame.getTitle().length() == 20);
assertTrue(mainFrame.getTitle()
.equalsIgnoreCase("PDB Sequence Fetcher"));
- txt_search.setSelectedItem("ABC");
+ PA.invokeMethod(PA.getValue(searchPanel, "txt_search"), "setSelectedItem(java.lang.String)", "ABC");
+ // txt_search.setSelectedItem("ABC");
try
{
// wait for web-service to handle response
try
{
// wait for web-service to handle response
diff --git
a/test/jalview/io/cache/JvCacheableInputBoxTest.java
b/test/jalview/io/cache/JvCacheableInputBoxTest.java
index
dfd7973
..
6c79f31
100644
(file)
--- a/
test/jalview/io/cache/JvCacheableInputBoxTest.java
+++ b/
test/jalview/io/cache/JvCacheableInputBoxTest.java
@@
-34,7
+34,7
@@
public class JvCacheableInputBoxTest
try
{
try
{
- // This 1ms delay is essential to prevent the
+ // This delay is essential to prevent the
// assertion below from executing before
// swing thread finishes updating the combo-box
Thread.sleep(100);
// assertion below from executing before
// swing thread finishes updating the combo-box
Thread.sleep(100);