1 19 20 34 35 package org.netbeans.properties.jelly2tests.suites.creating_properties_file; 36 37 import org.netbeans.jellytools.*; 38 import org.netbeans.jemmy.QueueTool; 39 import lib.PropertiesEditorTestCase; 40 import org.netbeans.jemmy.EventTool; 41 import org.netbeans.jemmy.TimeoutExpiredException; 42 import org.netbeans.jemmy.operators.JTextFieldOperator; 43 44 45 49 public class CreatingPropertiesFileFromMainWindow1 extends PropertiesEditorTestCase { 50 51 54 55 56 57 60 public CreatingPropertiesFileFromMainWindow1() { 61 super("testCreatingPropertiesFileFromMainWindow1"); 62 } 63 64 65 69 public void testCreatingPropertiesFileFromMainWindow1() { 70 71 openDefaultProject(); 73 74 78 79 MainWindowOperator mainWindowOp = MainWindowOperator.getDefault(); 80 mainWindowOp.menuBar().pushMenuNoBlock("File"+menuSeparator+"New File...",menuSeparator); 81 82 86 NewFileWizardOperator newWizard = new NewFileWizardOperator(); 87 newWizard.selectCategory(WIZARD_CATEGORY_FILE); 88 newWizard.selectFileType(WIZARD_FILE_TYPE); 89 newWizard.next(); 90 91 92 99 NewFileNameLocationStepOperator nameStepOper = new NewFileNameLocationStepOperator(); 101 JTextFieldOperator jtfo = new JTextFieldOperator(nameStepOper,2); 102 jtfo.setText("src"); 103 104 108 newWizard.finish(); 109 110 111 116 if ( ! existsFileInEditor(WIZARD_DEFAULT_PROPERTIES_FILE_NAME) ) 117 fail("File "+ WIZARD_DEFAULT_PROPERTIES_FILE_NAME +" not found in Editor window"); 118 if ( ! existsFileInExplorer("<default package>",WIZARD_DEFAULT_PROPERTIES_FILE_NAME+".properties") ) 119 fail("File "+ WIZARD_DEFAULT_PROPERTIES_FILE_NAME +" not found in explorer"); 120 121 } 122 123 public void tearDown() { 124 log("Teardown"); 125 closeFiles(); 126 } 127 128 129 130 } 131 | Popular Tags |