| lib.PropertiesEditorTestCase
All known Subclasses: org.netbeans.properties.jelly2tests.suites.creating_properties_file.CreatingPropertiesFileFromMainWindow2, org.netbeans.properties.jelly2tests.suites.creating_properties_file.CreatingPropertiesFileFromMainWindow1, org.netbeans.properties.jelly2tests.suites.creating_properties_file.CreatingPropertiesFileFromExplorer1, org.netbeans.properties.jelly2tests.suites.creating_properties_file.CreatingPropertiesFileFromExplorer2,
PropertiesEditorTestCase | public class PropertiesEditorTestCase extends JellyTestCase (Code) | | Class implementing all necessary methods for handling Property sheet in Editor window.
This class is used for automated tests of properties module.
author: Petr Felenda ( e-mail petr.felenda@sun.com ) version: 1 |
Method Summary | |
public void | addLocaleDialogClickCancelButton() Clicks to 'Cancel' button in 'Add Locale...' dialog. | public void | addLocaleDialogClickHelpButton() Clicks to 'Help' button in 'Add Locale...' dialog. | public void | addLocaleDialogClickOkButtonNoBlock() Clicks to 'Ok' button in 'Add Locale...' dialog. | public void | addLocaleDialogFill(String languageCode, String countryCode, String variant, Node filesystemNode, String fileName) Fills values to 'Add Locale...' dialog. | public int | checkEditorTabCount() | public void | checkLocalesInExplorer(java.lang.String[] locales, Node filesystemNode, java.lang.String fileName) | public void | checkPropertiesFileIntegrityInClassicEditor(String fileName) | public void | checkPropertiesInSheet(String fileName, String key, String value, String comment, int rowOfCheckedProperty, int localeCount, int rowCount) There will be found adequte key in property sheet and then will be checked value and comment. | public void | closeFiles() This close all files in editor. | public void | closeHelp() Closes 'Help' window. | public void | closePropertiesFile(String fileName) This closes properties file. | public void | confirmationDeleteteLocaleDialogClickNo() | public void | confirmationDeleteteLocaleDialogClickYes() | public void | confirmationDeleteteMoreLocalesDialogClickYes() | public void | createNewPropertiesFile(Node node) It creates new property file. | public void | createNewPropertiesFileAndOpenInClassicEditor(Node node, String fileName) | public void | customizeLocalesDialogClickAddLocaleButton() Clicks to 'Add Locale...' button in customizer. | public void | customizeLocalesDialogClickCloseButton() Clicks to 'Close' button in customizer. | public void | customizeLocalesDialogClickHelpButton() Clicks to 'Help' button in customizer. | public void | customizeLocalesDialogClickRemoveLocaleButton() Clicks to 'Remove Locale' button in customizer. | public boolean | customizeLocalesDialogIsEnabledRemoveLocaleButton() This checks if has been selected 'Remove Locale' button. | public void | customizeLocalesDialogSelectLocale(int row) | public void | customizePropertiesDialogClickAddKeyButton() | public void | customizePropertiesDialogClickCloseButton() | public void | customizePropertiesDialogClickHelpButton() | public void | customizePropertiesDialogClickRemovePropertyButton() | public boolean | customizePropertiesDialogIsEnableRemovePropertyButton() | public void | customizePropertiesDialogSelectProperty(int row) | public void | deleteLocaleFromExplorer(Node fileNode, String path) | public void | deleteMoreLocalesInExplorer(String[] Languages, String[] Countres, String[] Varians, Node fileNode, String path_to_group) | public void | deletePropertiesFileFromExplorer(Node filesystemNode, String filePath) This deletes properties file from disk. | public void | errorDialogClickOkButton() Closes 'Error' dialog. | public boolean | existsFileInEditor(String fileName) Check if file exists in Editor. | public boolean | existsFileInExplorer(String packageName, String fileName) | public void | explorerSelectPath(String treePath, Node filesystemNode) | protected Node | getDefaultPackageNode() | protected Node | getNode(String packageName) | public int | getPropertiesFileItemsCount(String fileName) There will be counted rows in property sheet in properties editor. | public void | newPropertyDialogClickCancelButton() Closes 'New property' dialog. | public void | newPropertyDialogClickCloseButton() This closes 'New property' dialog. | public void | newPropertyDialogClickHelpButton() It clicks on 'Help' button in 'New property' dialog. | public void | newPropertyDialogClickOkButtonNoBlock() This closes dialog as in previous method, but there is used no block action for closing dialog. | public void | newPropertyDialogFill(String fileName, String key, String value, String comment) This fill three textafields in 'New property' dialog. | public void | openAddLocaleDialogFromExplorer(Node filesystemNode, String filePath) | public void | openAddPropertyDialogFromExplorer(Node filesystemNode, String path) Opens 'Add Property' dialog from explorer. | public void | openCustomizeLocalesDialogFromExplorer(Node filesystemNode, String path) Opens Customizer dialog. | public void | openCustomizePropertiesDialogFromExplorer(Node fileNode, String path) | protected void | openDefaultProject() | public void | openExistedPropertiesFile(String treeSubPackagePathToFile, String fileName) This method opens file in editor. | public void | openExistedPropetiesFileInClassicEditor(Node filesystemNode, String filePath) This method opens file in editor. | protected void | openProject(String projectName) This method open project. | public void | propertiesEditorClickNewPropertyButton(String fileName) | public void | propertiesEditorClickRemovePropertyButton(String fileName) This pushs 'Remove property' button in properties editor form. | public void | propertiesEditorCloseFromTabPane() This opens popup menu over tab in properties file and chooses close item from it. | public void | propertiesWindowChangeProperty(String objectName, String propertyName, String newValue) | public void | questionDialogClickCancelButton() Clicks to 'Cancel' button in 'Question' dialog. | public void | questionDialogClickDiscardButton() | public void | questionDialogClickOkButton() Clicks to button 'Ok' in Quiestion dialog. | public void | requestFocusEditorPane(String nameOfTab) | public void | selectPropertiesFileItem(String fileName, int rowNumber) This selectes row in sheet of properties in properties editor. | public void | tableViewClickTo(String fileName, int row, int column) |
WIZARD_CATEGORY_FILE | final protected String WIZARD_CATEGORY_FILE(Code) | | |
WIZARD_DEFAULT_PROPERTIES_FILE_NAME | final protected String WIZARD_DEFAULT_PROPERTIES_FILE_NAME(Code) | | |
WIZARD_FILE_TYPE | final protected String WIZARD_FILE_TYPE(Code) | | |
defaultProjectName | final protected static String defaultProjectName(Code) | | |
PropertiesEditorTestCase | public PropertiesEditorTestCase(String testMethodName)(Code) | | This constructor only creates operator's object and then does nothing.
|
addLocaleDialogClickCancelButton | public void addLocaleDialogClickCancelButton()(Code) | | Clicks to 'Cancel' button in 'Add Locale...' dialog.
|
addLocaleDialogClickHelpButton | public void addLocaleDialogClickHelpButton()(Code) | | Clicks to 'Help' button in 'Add Locale...' dialog.
|
addLocaleDialogClickOkButtonNoBlock | public void addLocaleDialogClickOkButtonNoBlock()(Code) | | Clicks to 'Ok' button in 'Add Locale...' dialog.
|
addLocaleDialogFill | public void addLocaleDialogFill(String languageCode, String countryCode, String variant, Node filesystemNode, String fileName) throws Exception(Code) | | Fills values to 'Add Locale...' dialog. ( use null values if nothig to be filed )
Parameters: languageCode - is Language Code e.g. cs, de, en or other staff Parameters: countryCode - is Country Code e.g. CZ, DE, US or other stuff Parameters: variant - is variant of locale, this should be empty or should will have value e.g. EURO Parameters: filesystemNode - is node of tree in explorer Parameters: fileName - is name of file throws: Exception - if an appeared |
checkEditorTabCount | public int checkEditorTabCount()(Code) | | |
checkPropertiesFileIntegrityInClassicEditor | public void checkPropertiesFileIntegrityInClassicEditor(String fileName) throws Exception(Code) | | This method check pleces of keys, values and comments in properties file (in
text mode)
throws: Exception - if an appeared |
checkPropertiesInSheet | public void checkPropertiesInSheet(String fileName, String key, String value, String comment, int rowOfCheckedProperty, int localeCount, int rowCount) throws Exception(Code) | | There will be found adequte key in property sheet and then will be checked value and comment. If kye will not found then method fail.
Parameters: key - which will be compared with key in properties file Parameters: value - of key which will be compared with value in properties file Parameters: comment - of key witch will be compared with comment in propertiies file Parameters: rowOfCheckedProperty - is number of compared propererty in properties file (row position >=0) Parameters: localeCount - is count of locales in properties file, new file has 1 locale (default) Parameters: rowCount - is count of rows (properties) in properties file throws: Exception - if an appeared |
closeFiles | public void closeFiles()(Code) | | This close all files in editor. This method should be called in teardown method
|
closeHelp | public void closeHelp()(Code) | | Closes 'Help' window.
|
closePropertiesFile | public void closePropertiesFile(String fileName)(Code) | | This closes properties file. There is used popup menu in Explorer.
Parameters: filesystemNode - of tree, where file is stored ( without file name ) Parameters: filePath - of file to delete |
confirmationDeleteteLocaleDialogClickNo | public void confirmationDeleteteLocaleDialogClickNo()(Code) | | |
confirmationDeleteteLocaleDialogClickYes | public void confirmationDeleteteLocaleDialogClickYes()(Code) | | |
confirmationDeleteteMoreLocalesDialogClickYes | public void confirmationDeleteteMoreLocalesDialogClickYes()(Code) | | |
createNewPropertiesFile | public void createNewPropertiesFile(Node node)(Code) | | It creates new property file. There is used popup menu from explorer.
Parameters: filesystemNode - node of tree, where file will be created Parameters: filePath - of file without extension |
createNewPropertiesFileAndOpenInClassicEditor | public void createNewPropertiesFileAndOpenInClassicEditor(Node node, String fileName)(Code) | | Method createNewPropertiesFileToClassicEditor()
Parameters: filesystemNode - is node of filesystem in which is file located in Explorer Parameters: fileName - is name of file |
customizeLocalesDialogClickAddLocaleButton | public void customizeLocalesDialogClickAddLocaleButton()(Code) | | Clicks to 'Add Locale...' button in customizer.
|
customizeLocalesDialogClickCloseButton | public void customizeLocalesDialogClickCloseButton()(Code) | | Clicks to 'Close' button in customizer.
|
customizeLocalesDialogClickHelpButton | public void customizeLocalesDialogClickHelpButton()(Code) | | Clicks to 'Help' button in customizer.
|
customizeLocalesDialogClickRemoveLocaleButton | public void customizeLocalesDialogClickRemoveLocaleButton()(Code) | | Clicks to 'Remove Locale' button in customizer.
|
customizeLocalesDialogIsEnabledRemoveLocaleButton | public boolean customizeLocalesDialogIsEnabledRemoveLocaleButton()(Code) | | This checks if has been selected 'Remove Locale' button.
true if locale button has been selected |
customizeLocalesDialogSelectLocale | public void customizeLocalesDialogSelectLocale(int row)(Code) | | Selects focus adequate to locale in customizer
Parameters: row - of locale you wish to select |
customizePropertiesDialogClickAddKeyButton | public void customizePropertiesDialogClickAddKeyButton()(Code) | | |
customizePropertiesDialogClickCloseButton | public void customizePropertiesDialogClickCloseButton()(Code) | | |
customizePropertiesDialogClickHelpButton | public void customizePropertiesDialogClickHelpButton()(Code) | | |
customizePropertiesDialogClickRemovePropertyButton | public void customizePropertiesDialogClickRemovePropertyButton()(Code) | | |
customizePropertiesDialogIsEnableRemovePropertyButton | public boolean customizePropertiesDialogIsEnableRemovePropertyButton()(Code) | | |
customizePropertiesDialogSelectProperty | public void customizePropertiesDialogSelectProperty(int row)(Code) | | |
deleteLocaleFromExplorer | public void deleteLocaleFromExplorer(Node fileNode, String path)(Code) | | |
deleteMoreLocalesInExplorer | public void deleteMoreLocalesInExplorer(String[] Languages, String[] Countres, String[] Varians, Node fileNode, String path_to_group)(Code) | | |
deletePropertiesFileFromExplorer | public void deletePropertiesFileFromExplorer(Node filesystemNode, String filePath)(Code) | | This deletes properties file from disk. There is used popup menu in Explorer.
Parameters: filesystemNode - of tree, where file is stored ( without file name ) Parameters: filePath - of file to delete |
errorDialogClickOkButton | public void errorDialogClickOkButton()(Code) | | Closes 'Error' dialog. This dialog appeared after property is added with existed key. (Key which
exists in properties file)
|
existsFileInEditor | public boolean existsFileInEditor(String fileName)(Code) | | Check if file exists in Editor. This method compare the title name of
tab in editor window.
|
existsFileInExplorer | public boolean existsFileInExplorer(String packageName, String fileName)(Code) | | |
explorerSelectPath | public void explorerSelectPath(String treePath, Node filesystemNode)(Code) | | |
getDefaultPackageNode | protected Node getDefaultPackageNode()(Code) | | |
getPropertiesFileItemsCount | public int getPropertiesFileItemsCount(String fileName) throws Exception(Code) | | There will be counted rows in property sheet in properties editor.
counts of rows in property sheet throws: Exception - if an appeared |
newPropertyDialogClickCancelButton | public void newPropertyDialogClickCancelButton()(Code) | | Closes 'New property' dialog. There is used 'Cancel' button.
|
newPropertyDialogClickCloseButton | public void newPropertyDialogClickCloseButton()(Code) | | This closes 'New property' dialog. There is used close button for this action in
this dialog. ( dialog must be open )
|
newPropertyDialogClickHelpButton | public void newPropertyDialogClickHelpButton()(Code) | | It clicks on 'Help' button in 'New property' dialog.
|
newPropertyDialogClickOkButtonNoBlock | public void newPropertyDialogClickOkButtonNoBlock()(Code) | | This closes dialog as in previous method, but there is used no block action for closing dialog.
|
newPropertyDialogFill | public void newPropertyDialogFill(String fileName, String key, String value, String comment) throws Exception(Code) | | This fill three textafields in 'New property' dialog.
Parameters: key - which will be filled to appeared dialog 'New property' Parameters: value - of key, which will be filled to appeared dialog 'New property' Parameters: comment - of key, which will be filles to appeared dialog 'New property' throws: Exception - is throws if appeared |
openAddLocaleDialogFromExplorer | public void openAddLocaleDialogFromExplorer(Node filesystemNode, String filePath)(Code) | | Open 'Add Locale..' dialog and do nothing
Parameters: filesystemNode - is node of filesystem in which is file located in Explorer Parameters: filePath - is path to file in tree in Explorer |
openAddPropertyDialogFromExplorer | public void openAddPropertyDialogFromExplorer(Node filesystemNode, String path)(Code) | | Opens 'Add Property' dialog from explorer.
Parameters: filesystemNode - is node of tree in explorer Parameters: path - of file in tree in explorer |
openCustomizeLocalesDialogFromExplorer | public void openCustomizeLocalesDialogFromExplorer(Node filesystemNode, String path)(Code) | | Opens Customizer dialog.
Parameters: filesystemNode - node of filesystem in tree in explorer Parameters: path - to the object you can customize |
openCustomizePropertiesDialogFromExplorer | public void openCustomizePropertiesDialogFromExplorer(Node fileNode, String path)(Code) | | |
openDefaultProject | protected void openDefaultProject()(Code) | | |
openExistedPropertiesFile | public void openExistedPropertiesFile(String treeSubPackagePathToFile, String fileName)(Code) | | This method opens file in editor. There is used popup menu in explorer.
Usage :
FilesystemNode filesystemNode = new FilesystemNode(
System.getProperty("netbeans.user") +
File.separator +
"sampledir");
openExistedPropertiesFile(filesystemNode.getPath()+"|"+"myFile");
Parameters: filePath - of existed file in explorer ( without extension ) |
openExistedPropetiesFileInClassicEditor | public void openExistedPropetiesFileInClassicEditor(Node filesystemNode, String filePath)(Code) | | This method opens file in editor. There is used popup menu in explorer for this action.
Parameters: filesystemNode - of mounted directory ( without extension ) Parameters: filePath - of file in explorer tree |
openProject | protected void openProject(String projectName)(Code) | | This method open project.
1) It is checked if the project is open
before the project is opened.
2) open project
3) check if project is open
Parameters: projectName - is name of the project stored in .../editor/test/qa-functional/data/ directory. |
propertiesEditorClickNewPropertyButton | public void propertiesEditorClickNewPropertyButton(String fileName)(Code) | | It clicks to the 'New property' button in properties editor ( table view )
|
propertiesEditorClickRemovePropertyButton | public void propertiesEditorClickRemovePropertyButton(String fileName)(Code) | | This pushs 'Remove property' button in properties editor form.
|
propertiesEditorCloseFromTabPane | public void propertiesEditorCloseFromTabPane() throws Exception(Code) | | This opens popup menu over tab in properties file and chooses close item from it.
|
propertiesWindowChangeProperty | public void propertiesWindowChangeProperty(String objectName, String propertyName, String newValue)(Code) | | |
questionDialogClickCancelButton | public void questionDialogClickCancelButton()(Code) | | Clicks to 'Cancel' button in 'Question' dialog. This dialog appeared after pushing 'Remove Property' button in
properties editor.
|
questionDialogClickDiscardButton | public void questionDialogClickDiscardButton()(Code) | | |
questionDialogClickOkButton | public void questionDialogClickOkButton()(Code) | | Clicks to button 'Ok' in Quiestion dialog. This dialog appeared after pushing 'Remove Property' button.
|
requestFocusEditorPane | public void requestFocusEditorPane(String nameOfTab)(Code) | | |
selectPropertiesFileItem | public void selectPropertiesFileItem(String fileName, int rowNumber) throws Exception(Code) | | This selectes row in sheet of properties in properties editor.
Parameters: rowNumber - is number of row in property sheet throws: Exception - if an appeared |
tableViewClickTo | public void tableViewClickTo(String fileName, int row, int column)(Code) | | |
|
|