Browse Source

And without dodgy waiting?

git-svn-id: http://svn.dmdirc.com/trunk@4465 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Chris Smith 16 years ago
parent
commit
c97d9c495c

+ 1
- 9
test/com/dmdirc/ui/swing/dialogs/actionsmanager/ActionsManagerDialogTest.java View File

76
         
76
         
77
         DialogFixture newwin = WindowFinder.findDialog(StandardInputDialog.class)
77
         DialogFixture newwin = WindowFinder.findDialog(StandardInputDialog.class)
78
                 .withTimeout(5000).using(window.robot);
78
                 .withTimeout(5000).using(window.robot);
79
-        
80
-        while (!newwin.target.isVisible()) { Thread.sleep(100); }
81
-        
79
+                
82
         newwin.requireVisible();
80
         newwin.requireVisible();
83
         assertEquals("New action group", newwin.target.getTitle());
81
         assertEquals("New action group", newwin.target.getTitle());
84
         
82
         
85
         newwin.button(new ButtonTextFinder("Cancel")).click();
83
         newwin.button(new ButtonTextFinder("Cancel")).click();
86
         
84
         
87
-        while (newwin.target.isVisible()) { Thread.sleep(100); }
88
-        
89
         newwin.requireNotVisible();
85
         newwin.requireNotVisible();
90
         
86
         
91
         window.panel(new ClassFinder<JPanel>(JPanel.class, null))
87
         window.panel(new ClassFinder<JPanel>(JPanel.class, null))
94
         newwin = WindowFinder.findDialog(StandardInputDialog.class)
90
         newwin = WindowFinder.findDialog(StandardInputDialog.class)
95
                 .withTimeout(5000).using(window.robot);
91
                 .withTimeout(5000).using(window.robot);
96
         
92
         
97
-        while (!newwin.target.isVisible()) { Thread.sleep(100); }
98
-        
99
         newwin.requireVisible();
93
         newwin.requireVisible();
100
         newwin.button(new ButtonTextFinder("OK")).requireDisabled();
94
         newwin.button(new ButtonTextFinder("OK")).requireDisabled();
101
         
95
         
103
                 new ClassFinder<JTextComponent>(javax.swing.JTextField.class, null));
97
                 new ClassFinder<JTextComponent>(javax.swing.JTextField.class, null));
104
         jtcf.enterText("amd-ui-test1");
98
         jtcf.enterText("amd-ui-test1");
105
         
99
         
106
-        while (!jtcf.target.getText().equals("amd-ui-test1")) { Thread.sleep(100); }
107
-        
108
         newwin.button(new ButtonTextFinder("OK")).requireEnabled().click();
100
         newwin.button(new ButtonTextFinder("OK")).requireEnabled().click();
109
         
101
         
110
         // Ensure it's added
102
         // Ensure it's added

Loading…
Cancel
Save