01: /*
02: * SwitchTest.java
03: *
04: * Created on Mar 28, 2007, 12:11:27 PM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09: package org.netbeans.test.options.general;
10:
11: import junit.textui.TestRunner;
12: import org.netbeans.jellytools.OptionsOperator;
13: import org.netbeans.jemmy.operators.DialogOperator;
14: import org.netbeans.jemmy.operators.JButtonOperator;
15: import org.netbeans.junit.NbTestCase;
16: import org.netbeans.junit.NbTestSuite;
17:
18: /**
19: *
20: * @author ms159439
21: */
22: public class SwitchTest extends NbTestCase {
23:
24: /**
25: * Create new instance
26: * @param testName
27: */
28: public SwitchTest(String testName) {
29: super (testName);
30: }
31:
32: /**
33: * Returns su
34: * @return
35: */
36: public static NbTestSuite suite() {
37: NbTestSuite suite = new NbTestSuite(SwitchTest.class);
38: return suite;
39: }
40:
41: /**
42: * This tests tries to detect unneccessary confirmation dialog
43: * "Do you want to apply changes?
44: *
45: */
46: public void testSwitchToAdvancedOptions() {
47: OptionsOperator odop = OptionsOperator.invoke();
48: odop.selectCategory("Miscellaneous"); //select 'Misc' panel
49: JButtonOperator jbo = new JButtonOperator(odop,
50: "Advanced Options");
51: jbo.push();
52: new org.netbeans.jemmy.EventTool().waitNoEvent(2000);
53: assertFalse("Unnecessary question dialog when "
54: + "changing ro 'Advanced OD'(IZ 99210)", odop
55: .isVisible()); //modern OD should not be visible,
56: //Advanced shloub be focused by now
57: }
58:
59: /**
60: * Main method for testing purposes
61: * @param args
62: */
63: public static void main(String[] args) {
64: TestRunner.run(new NbTestSuite(SwitchTest.class));
65: }
66:
67: }
|