[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Wed Apr 4 01:29:20 UTC 2007
gordonp
Tue Apr 3 21:29:20 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/test
In directory dev.open-bio.org:/tmp/cvs-serv9342/src/main/ca/ucalgary/seahawk/gui/test
Modified Files:
SeahawkTestCase.java
Log Message:
Mouse movement tweaks for more robust popup usage, check if async service also has secondary params
moby-live/Java/src/main/ca/ucalgary/seahawk/gui/test SeahawkTestCase.java,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/test/SeahawkTestCase.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/test/SeahawkTestCase.java 2007/04/03 02:32:14 1.5
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/test/SeahawkTestCase.java 2007/04/04 01:29:20 1.6
@@ -570,7 +570,8 @@
public void testCloseOtherTabs(){
}
- public void findService(String sequenceData, String targetMenuText, String targetServiceLabelText) throws Exception{
+ // returns the text label of the service menu item invoked
+ public String findService(String sequenceData, String targetMenuText, String targetServiceLabelText) throws Exception{
// load a dna sequence in a tab
MobyDataObject mobyObject = MobyUtils.createMobySequence(sequenceData, "foo");
contentGUI.loadPaneFromObject(new MobyContentInstance(mobyObject, "hyperlink-test"), true); //true = load in new tab
@@ -617,7 +618,7 @@
openPopup instanceof JPopupMenu);
// Move the mouse a bit to the right to bring up the submenu
- robot.mouseMove(screenPos.x+10, screenPos.y+8);
+ robot.mouseMove(screenPos.x+10, screenPos.y+10);
// Find a submenu with services
Component serviceTypeChoices = getSubComponentByName((JPopupMenu) openPopup,
@@ -668,18 +669,23 @@
robot.keyRelease(KeyEvent.VK_SHIFT);
//serviceChosen.doClick(300);
sleep(2000);
+
+ return servicePathChosen.elementAt(servicePathChosen.size()-1).getText();
}
public void testRunAsynchronousService() throws Exception{
+ String serviceLabel = null;
try{
- findService(TEST_AA_SEQ, "Bioinformatics", "(async)");
+ serviceLabel = findService(TEST_AA_SEQ, "Bioinformatics", "(async)");
} catch(Exception e){
e.printStackTrace();
fail("Error while finding a service ending with \"(async)\" " +
"(asynchronous execution) under \"Bioinformatics\" in the popup");
}
- fillInSecondariesAndExecute();
+ if(serviceLabel.indexOf("...") != 0){
+ fillInSecondariesAndExecute();
+ }
// Wait until the job is finished to proceed to the next test
while(contentGUI.getCurrentURL() == null){
@@ -811,6 +817,7 @@
robot.mouseMove(screenEndPos.x, screenEndPos.y);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
sleep(1000);
+ robot.mouseMove(screenEndPos.x+2, screenEndPos.y+2);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
sleep(2000);
More information about the MOBY-guts
mailing list