|
@@ -149,6 +149,58 @@ public class ActionEditorDialogTest implements UITestIface {
|
149
|
149
|
window.button(JButtonByTextMatcher.withText("OK")).requireDisabled();
|
150
|
150
|
}
|
151
|
151
|
|
|
152
|
+ @Test
|
|
153
|
+ public void testIllegalCondition() {
|
|
154
|
+ setupWindow(null);
|
|
155
|
+
|
|
156
|
+ window.panel(new ClassFinder<JPanel>(ActionNamePanel.class, null)).textBox()
|
|
157
|
+ .enterText("test1");
|
|
158
|
+ final JPanelFixture triggers = window.panel(
|
|
159
|
+ new ClassFinder<JPanel>(ActionTriggersPanel.class, null));
|
|
160
|
+
|
|
161
|
+ triggers.comboBox().selectItem("Channel message received");
|
|
162
|
+ triggers.button(JButtonByTextMatcher.withText("Add")).requireEnabled().click();
|
|
163
|
+
|
|
164
|
+ window.button(JButtonByTextMatcher.withText("OK")).requireEnabled();
|
|
165
|
+
|
|
166
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionsPanel.class, null))
|
|
167
|
+ .button(JButtonByTextMatcher.withText("Add")).requireEnabled().click();
|
|
168
|
+
|
|
169
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
170
|
+ .comboBox("argument").requireEnabled();
|
|
171
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
172
|
+ .comboBox("component").requireDisabled();
|
|
173
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
174
|
+ .comboBox("comparison").requireDisabled();
|
|
175
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
176
|
+ .textBox().requireDisabled();
|
|
177
|
+ window.button(JButtonByTextMatcher.withText("OK")).requireDisabled();
|
|
178
|
+
|
|
179
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
180
|
+ .comboBox("argument").selectItem("message");
|
|
181
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
182
|
+ .comboBox("component").requireEnabled();
|
|
183
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
184
|
+ .comboBox("comparison").requireDisabled();
|
|
185
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
186
|
+ .textBox().requireDisabled();
|
|
187
|
+ window.button(JButtonByTextMatcher.withText("OK")).requireDisabled();
|
|
188
|
+
|
|
189
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
190
|
+ .comboBox("component").selectItem("content");
|
|
191
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
192
|
+ .comboBox("comparison").requireEnabled();
|
|
193
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
194
|
+ .textBox().requireDisabled();
|
|
195
|
+ window.button(JButtonByTextMatcher.withText("OK")).requireDisabled();
|
|
196
|
+
|
|
197
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
198
|
+ .comboBox("comparison").selectItem("contains");
|
|
199
|
+ window.panel(new ClassFinder<JPanel>(ActionConditionEditorPanel.class, null))
|
|
200
|
+ .textBox().requireEnabled();
|
|
201
|
+ window.button(JButtonByTextMatcher.withText("OK")).requireEnabled();
|
|
202
|
+ }
|
|
203
|
+
|
152
|
204
|
protected void setupWindow(final Action action) {
|
153
|
205
|
window = new DialogFixture(ActionEditorDialog.getActionEditorDialog(null,
|
154
|
206
|
"amd-ui-test1", action));
|