|
@@ -29,6 +29,7 @@ import com.dmdirc.config.IdentityManager;
|
29
|
29
|
import com.dmdirc.config.InvalidIdentityFileException;
|
30
|
30
|
import com.dmdirc.harness.ui.ClassFinder;
|
31
|
31
|
import com.dmdirc.addons.ui_swing.dialogs.StandardInputDialog;
|
|
32
|
+import com.dmdirc.addons.ui_swing.dialogs.StandardQuestionDialog;
|
32
|
33
|
import com.dmdirc.addons.ui_swing.dialogs.actioneditor.ActionEditorDialog;
|
33
|
34
|
|
34
|
35
|
import java.lang.reflect.InvocationTargetException;
|
|
@@ -38,10 +39,9 @@ import javax.swing.JTextField;
|
38
|
39
|
import javax.swing.SwingUtilities;
|
39
|
40
|
|
40
|
41
|
import org.fest.swing.core.matcher.JButtonMatcher;
|
41
|
|
-import org.fest.swing.finder.JOptionPaneFinder;
|
42
|
42
|
import org.fest.swing.finder.WindowFinder;
|
43
|
43
|
import org.fest.swing.fixture.DialogFixture;
|
44
|
|
-import org.fest.swing.fixture.JOptionPaneFixture;
|
|
44
|
+import org.fest.swing.fixture.JButtonFixture;
|
45
|
45
|
import org.junit.After;
|
46
|
46
|
import org.junit.Before;
|
47
|
47
|
import org.junit.BeforeClass;
|
|
@@ -138,20 +138,20 @@ public class ActionsManagerDialogTest {
|
138
|
138
|
|
139
|
139
|
window.panel(new ClassFinder<JPanel>(JPanel.class, "Groups"))
|
140
|
140
|
.button(JButtonMatcher.withText("Delete")).requireEnabled().click();
|
141
|
|
-
|
142
|
|
- JOptionPaneFixture newwin = JOptionPaneFinder.findOptionPane()
|
143
|
|
- .withTimeout(5000).using(window.robot);
|
144
|
|
- newwin.buttonWithText("No").click();
|
|
141
|
+
|
|
142
|
+ DialogFixture newwin = WindowFinder.findDialog(StandardQuestionDialog.
|
|
143
|
+ class).withTimeout(5000).using(window.robot);
|
|
144
|
+ JButtonFixture button = newwin.button(JButtonMatcher.withText("No")).click();
|
145
|
145
|
|
146
|
146
|
assertTrue(ActionManager.getGroups().containsKey("amd-ui-test1"));
|
147
|
147
|
window.list().selectItem("amd-ui-test1").requireSelectedItems("amd-ui-test1");
|
148
|
148
|
|
149
|
149
|
window.panel(new ClassFinder<JPanel>(JPanel.class, "Groups"))
|
150
|
150
|
.button(JButtonMatcher.withText("Delete")).click();
|
151
|
|
-
|
152
|
|
- newwin = JOptionPaneFinder.findOptionPane()
|
153
|
|
- .withTimeout(5000).using(window.robot);
|
154
|
|
- newwin.buttonWithText("Yes").click();
|
|
151
|
+
|
|
152
|
+ newwin = WindowFinder.findDialog(StandardQuestionDialog.
|
|
153
|
+ class).withTimeout(5000).using(window.robot);
|
|
154
|
+ button = newwin.button(JButtonMatcher.withText("Yes")).click();
|
155
|
155
|
|
156
|
156
|
assertTrue(window.list().selection().length != 1 ||
|
157
|
157
|
!window.list().selection()[0].equals("amd-ui-test1"));
|