TS 74 PropertyEditors

"Test specification for Property Editors in Form module"

Author: Jana Maleckova
Version: 7.4
Last update: 23.06.2013
Introduction: This test specification is intended to test the most used properties editors.
Comments: Where specs refer to the insets property, use the margins property instead.

Contents


Test suite: Properties tests - general test

Purpose: Properties Window test.
Setup: Start IDE with clear userdir. Open some java project. Open Properties window from Windows-> IDE Tools -> Properties.

  1. Opening properties of folder in Files view
    1. In Files view, select some folder of the opened project (e.g. Src folder)
    2. push Properties from popup menu
    • EXPECTED RESULT: Sheet "{folder you selected} - Properties" arise. Check consistency between arised sheet and Properties window..
  2. Properties window refresh
    1. In Files view, select some folder of the opened project (e.g. Src folder)
    2. Select another folder (e.g. test)
    • EXPECTED RESULT: Properties window (Window > IDE Tools > Properties) titled "{folder you last selected} - Properties" refreshes and shows properties of actual selected folder
  3. Changing sort order in folder
    1. In Files view, select folder of opened project (e.g. JavaApplication1 folder)
    2. In Properties window, change Sort mode
    • EXPECTED RESULT: Sort order of items in project folder is changed.
  4. Project properties
    1. In Files view, select folder of opened project (e.g. JavaApplication1 folder)
    2. push Properties from popup menu
    • EXPECTED RESULT: Property sheet arise, properties of project are displayed.
  5. Rename via property "name"
    1. Select in Projects view some source package (e.g. javaapplication1)
    2. In properties window, change property NAME
    • EXPECTED RESULT: Refactoring should be launched, package should be renamed.
  6. Multiple selection, Properties
    1. select two folders nodes in Explorer
    2. push Properties from popup menu
    • EXPECTED RESULT: Property System Name of the Filesystem = <Different Values> and Root Filesystem = <Different Values>
  7. Multiple selection, Properties, change value
    1. select two folders nodes in Explorer
    2. push Properties from popup menu
    3. change property Sort Mode to By Type.
    • EXPECTED RESULT: Value of property is changed for both selected nodes.


Test suite: Properties sheet test - basic actions

Purpose: Test the content of the Basic properties tab and assure the possibility of settings change.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame) and place there several components

  1. Closing/reopening of Properties sheet
    1. Close property sheet which should be already opened in the right bottom corner of IDE as default
    2. Open property sheet from main menu Window -> IDE Tools -> Properties
    • EXPECTED RESULT: "Property sheet should be closed and automatically opened on the same place as was before"
  2. Sorting of properties - Sort By Name
    1. right click anywhere to Properties window area and choose Sort By Name from popup.
    • EXPECTED RESULT: properties in this Properties Window are sorted by name.
  3. Sorting of properties - Sort By Category
    1. right click anywhere to Properties window area and choose Sort By Category from popup.
    • EXPECTED RESULT: properties in this Properties Window are sorted by categories.
  4. Show Description area
    1. right click anywhere to Properties window area and choose Show description area from popup.
    • EXPECTED RESULT: if checked then there is visible Description area at bottom of Properties Window.
  5. Description area resize
    1. Resize the Description area at bottom of Properties window.
    • EXPECTED RESULT: You can resize the area.
  6. Multiple selection, Properties
    1. select two components in design of frame
    2. push Properties from popup menu
    • EXPECTED RESULT: Properties of components which are not the same should contain value < Different Values > . e.g. propertes like Text = < Different Values > or Action Command = < Different Values >
  7. Multiple selection, Properties, change value
    1. select two components in design of frame
    2. push Properties from popup menu
    3. change property Sort Mode to By Type.
    • EXPECTED RESULT: Value of property is changed for both selected nodes.


Test suite: "Testing various types of property editors"

Purpose: Check default values, possibility to change values and type invalid values
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame) and place there jButton component

  1. Property Editor for primitive type : boolean
    1. select jButton in design and click on property of boolean type e.g. enable (default value="True")
    2. uncheck checkbox
    • EXPECTED RESULT: New value is "False". jButton is disabled
  2. Property Editor for primitive type : boolean
    1. select jButton in design from previous test case and click on property "enable" (should be set as "False")
    2. check checkbox
    • EXPECTED RESULT: New value is "True". jButton is enabled again
  3. Property Editor for primitive type : float
    1. select jButton in design and click on property float, e.g aligmentX (default value="0.0")
    2. type "-123456789.123456789123456789"
    3. press Enter
    • EXPECTED RESULT: New value is "-1.23456792E8".
  4. Property Editor for primitive type : float - invalid value
    1. select jButton in design and click on property float, e.g aligmentY (default value="0.5")
    2. type in created textfield "xxx"
    3. press Enter
    • EXPECTED RESULT: Information dialog {Invalide value: value} arise and value isn't changed.
  5. Property Editor for primitive type : int
    1. select jButton in design and click on property of int type, e.g. "iconTextGap" (default value="4")
    2. type "-1234567890"
    3. press Enter
    • EXPECTED RESULT: Property "iconTextGap" should contain "-1234567890".
  6. Property Editor for primitive type : int - invalid value
    1. select jButton in design and click on property of int type, e.g. "displayedMnenomicIndex" (default value="-1")
    2. type "value"
    3. press Enter
    • EXPECTED RESULT: Information dialog {Invalide value: value} arise and value isn't changed.
  7. Property Editor for java.lang.String
    1. select jButton in design and click on property of string type, e.g. "text"
    2. type "Button for testing"
    3. press Enter
    • EXPECTED RESULT: Text property should contain string "Button for testing"
  8. Property Editor for type : java.lang.String - Customizer
    1. select jButton in design and click on property of string type
    2. push ... to invoke customizer editor
    3. in opened String Property Editor write to TextArea "My String"
    4. push Ok
    • EXPECTED RESULT: New value of text property should be set as "My String".
  9. Property Editor for type : java.lang.String - customizer, cancel
    1. select jButton in design and click on property of string type
    2. push ... to invoke customizer editor
    3. in opened String Property Editor write to TextArea "String No.2"
    4. push Cancel
    • EXPECTED RESULT: Value isn't changed and String Property Editor dialog is closed.
  10. Property Editor for type : java.lang.Color
    1. select jButton in design and click on property of Color type, e.g foreground (default value="[0,0,0]")
    2. type "20,10,100"
    3. press Enter
    • EXPECTED RESULT: New value is "[20,10,100]".
  11. Property Editor for type : java.lang.Color, invalid value
    1. select jButton in design and click on property of Color type, e.g background (default value="[236,233,216]")
    2. type "xx color"
    3. press Enter
    • EXPECTED RESULT: Warning dialog should be thrown "...is not a valid color identifier..." Value isn't changed and is set back to "[236,233,216]".
  12. Property Editor for type : java.awt.Dimension
    1. select jButton in design and click on property of Dimension type, e.g. prefferedSize (default value="[100,100]")
    2. type in created textfield "10,20"
    3. press Enter
    • EXPECTED RESULT: New value is "[10,20]".
  13. Property Editor for type : java.awt.Dimension - invalid value
    1. select jButton in design from previous test case and click on property of Dimension type, e.g. prefferedSize (default value="[10,20]")
    2. type "xx"
    3. press Enter
    • EXPECTED RESULT: Warning dialog {"Value of java.awt.Dimension should be..."} arises and value isn't changed.
  14. Property Editor for type : java.awt.Dimension, only one value
    1. select jButton in design from previous test case and click on property of Dimension type, e.g. prefferedSize (default value="[10,20]")
    2. type "10"
    3. press Enter
    • EXPECTED RESULT: New value is "[10,10]".
  15. Property Editor for type : java.awt.Insets
    1. select jButton in design and click on property of Insets type (default value="[2,14,2,14]")
    2. type in created textfield "10,20,30,40"
    3. press Enter
    • EXPECTED RESULT: New value is "[10,20,30,40]".
  16. Property Editor for type : java.awt.Insets - invalid value
    1. select jButton in design from previous test case and click on property of Insets type (default value="[10,20,30,40]")
    2. type in created textfield "xx"
    3. press Enter
    • EXPECTED RESULT: Information dialog {Value of java.awt.Insets should be..} arise and value isn't changed.
  17. Property Editor for type : java.awt.Insets - only one value
    1. select jButton in design from previous test case and click on property of Insets type (default value="[10,20,30,40]")
    2. type in created textfield "10"
    3. press Enter
    • EXPECTED RESULT: New value is "[10,10,10,10]".
  18. Property Editor for type : javax.swing.ButtonGroup
    1. insert two jRadioButtons
    2. insert buttonGroup
    3. select both jRadioButtons
    4. click on buttonGroup property (default value="<none>")
    5. choose buttonGroup1 from combobox
    6. press Enter
    • EXPECTED RESULT: New value of buttonGroup is set "buttonGroup1".


Test suite: Special property customizers

Purpose: To test special custom editors for some property type
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame) and place there jList, jCombobox and jPanel components

  1. Property Editor for type : java.lang.String[ ]
    1. select jList in design and click on property of type String[ ] e.g. model property (default value="Item 1, Item 2,Item 3,Item 4,Item 5")
    2. insert "remove, down, up, edit"
    3. press Enter
    • EXPECTED RESULT: New value of model property is "remove, down, up, edit" which are displayed in jList in design as well
  2. Property Editor for type : java.lang.String[ ], Customizer
    1. select jList from previous test case and click on model property String[ ] (value="remove, down, up, edit")
    2. push ... to invoke customizer editor
    3. in opened custom editor do editing in text area like adding new row, editing and deleting of row,create empty one and so on.
    4. press OK
    • EXPECTED RESULT: jList should displayed new modifications. Each row in customizer represents jList's Item.
  3. Property Editor for type : java.lang.String[ ], Customizer , Cancel
    1. select jList from previous test case and click on model property String[ ] (default value="str2, str3, str1")
    2. push ... to invoke customizer editor
    3. in opened String[[ | ]] Property Editor write "add" to textfield
    4. push Add
    5. push Cancel
    • EXPECTED RESULT: Value isn't changed
  4. Property Editor for type : java.lang.String[ ], Customizer , Reset To Default
    1. select jList from previous test case and click on model property String[ ] (default value="str2, str3, str1")
    2. push ... to invoke customizer editor
    3. push Reset to default
    • EXPECTED RESULT: jList doesn't contain any items and is displayed with default size in design. No exception is thrown
  5. Property Editor for type : java.lang.String[ ] for jCombobox
    1. Do all previous steps to test if all changes are correctly set to jCombobox model
    • EXPECTED RESULT:
  6. Property Editor for type : jTree model customizer
    1. insert jTree into design and click on model property
    2. push ... to invoke customizer editor
    3. edit strings in the left column
    4. add new row
    5. indent the beginning of line
    6. delete the whole row
    • EXPECTED RESULT: Right Column of customizer should show how does the tree look like. Each line represents node and indentation should initiate the subnode.
  7. Property Editor for type : jTree model customizer Reset To Default
    1. select jTree from previous test case and click on model property
    2. push ... to invoke customizer editor
    3. push Reset to default
    • EXPECTED RESULT: jTree should contain default tree nodes like JTree - colors,sports, food. No exception is thrown
  8. Property Editor for type : java.awt.Color - Customizer, Swatches
    1. select jPanel and click on model property of type Color, e.g. background (default value="[236,233,216]")
    2. push ...
    3. in opened Color Property Editor select tab Swatches
    4. select square represented white color
    5. push Ok
    • EXPECTED RESULT: New value is "[255,255,255]") and colored icon is displayed behind color name.
  9. Property Editor for type : java.awt.Color - Customizer, System Palette
    1. select jPanel from previous test case and click on model property of type Color, e.g. background (default value="[255,255,255]")
    2. push ...
    3. in opened Color Property Editor select tab System Palette
    4. select Active Caption
    5. push Ok
    • EXPECTED RESULT: New value is "Active Caption" and colored icon is displayed behind color name.
  10. Property Editor for type : java.awt.Color - customizer, Cancel
    1. click on property Color of jPanel default property from previous test case is "Active Caption"
    2. push ...
    3. in opened Color Property Editor select tab System Palette
    4. select Control
    5. push Cancel
    • EXPECTED RESULT: Value isn't changed.
  11. Property Editor for type : java.awt.Color - Customizer, test all color types
    1. Do previous test cases for HSB, RGB, AWT Palette, Swing Palette color types
    • EXPECTED RESULT: New values should be correctly saved and set for the component.
  12. Property Editor for type : java.awt.Dimension, Customizer
    1. select jPanel and click on property of Dimension type, e.g. prefferedSize (default value="[100,100]")
    2. push ...
    3. in opened Dimension Property Editor write "30" to the Width textfield and "40" to the Height textfield
    4. push Ok
    • EXPECTED RESULT: New value is "[30,40]".
  13. Property Editor for type : java.awt.Dimension, Customizer, Cancel
    1. select jPanel from previous test case and click on property of Dimension type (default value="[30,40]")
    2. push ...
    3. in opened Dimension Property Editor write "300" to the Width textfield and "400" to the Height textfield
    4. push Cancel
    • EXPECTED RESULT: Value isn't changed.
  14. Property Editor for type : java.awt.Dimension, Customizer, Invalid
    1. select jPanel from previous test case and click on property of Dimension type (default value="[30,40]")
    2. push ...
    3. in opened Dimension Property Editor write "xx" to the Width textfield and "ww" to the Height textfield
    • EXPECTED RESULT: Button OK on customizer dialog should be disabled and should not allow to save invalid values
  15. Property Editor for type : java.awt.Font, Customizer
    1. select jButton and click on property of Font type, e.g. font (default value="Tahoma 11 Plain")
    2. push ... to invoke custom editor
    3. in opened Font Property Editor select in Font list "Arial"
    4. select in Font Type list "Bold"
    5. type size toSize textfield "10"
    6. push Ok
    • EXPECTED RESULT: Value is changed and displayed font of property value is the same as property value "Arial 10 Bold".
  16. Property Editor for type : java.awt.Font, Customizer, not listed size
    1. select jButton from previous test case and click on property of Font type (default value="Arial 10 Bold")
    2. push ...
    3. in opened Font Property Editor select in Font list "Arial Narrow"
    4. select in Font Type list "Italic"
    5. type size toSize textfield "13"
    6. push Ok
    • EXPECTED RESULT: Value is changed and displayed font of property value is the same as property value "Arial Narrow 13 Italic".
  17. Property Editor for type : java.awt.Font, Customizer, Cancel
    1. select jButton from previous test case and click on property of Font type (default value="Arial Narrow 13 Italic")
    2. push ...
    3. in opened Font Property Editor select in Font list "Cuorier New"
    4. select in Font Type list "Bold"
    5. type size toSize textfield "100"
    6. push Cancel
    • EXPECTED RESULT: Value isn't changed.
  18. Property Editor for type : java.awt.Font, Customizer, invalid
    1. select jButton from previous test case and click on property of Font type (default value="Arial Narrow 13 Italic")
    2. push ...
    3. in opened Font Property Editor select in Font list "Arial"
    4. select in Font Type list "Bold Italic"
    5. type size toSize textfield "xx"
    6. push Ok
    • EXPECTED RESULT: Value is changed and displayed font of property value is the same as property value "Arial Bold Italic {previous size}".
  19. Property Editor for type : java.awt.Font, Customizer "Derive the font from the default font"
    1. select jButton from previous test case and click on property of Font type, e.g. font (default value="Arial Bold 13 Italic")
    2. push ... to invoke custom editor
    3. check option "Derive the font from the default font "
    4. set Relative font size to +3
    5. push Ok
    • EXPECTED RESULT: Value is changed and displayed font of property value is the same as property value "Tahoma 14 Plain".
  20. Property Editor for type : java.awt.Insets, Customizer
    1. select jButton and click on property of Insets type, e.g. margin (default value="[2,14,2,14]")
    2. push ...
    3. in opened Insets Property Editor write "10" to the Top textfield
    4. and "20" to the Left textfield
    5. and "30" to the Bottom textfield
    6. and "40" to the Right textfield
    7. push Ok
    • EXPECTED RESULT: New value is "[10,20,30,40]".
  21. Property Editor for type : java.awt.Insets, Customizer, Cancel
    1. select jButton from previous test case and click on property of Insets type (default value="[10,20,30,40]")
    2. push ...
    3. in opened Insets Property Editor write "100" to the Top textfield
    4. and "200" to the Left textfield
    5. and "300" to the Bottom textfield
    6. and "400" to the Right textfield
    7. push Cancel
    • EXPECTED RESULT: Value isn't changed.
  22. Property Editor for type : java.awt.Insets, Customizer, invalid
    1. select jButton from previous test case and click on property of Insets type (default value="[10,20,30,40]")
    2. push ...
    3. in opened Insets Property Editor write "xx" to the Top textfield
    4. and "200" to the Left textfield
    5. and "300" to the Bottom textfield
    6. and "400" to the Right textfield
    7. push Ok
    • EXPECTED RESULT: Button OK on customizer dialog should be disabled and should not allow to save invalid values.


Test suite: Events tab

Purpose: Events tab assure consistency between Component Navigator's Events tab and Explorer's Methods view and persistence of following changes. Save and reload the form again.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame) containing several components.

  1. Assure click over name of the event
    1. Click over empty handler in the Event tab causes appearance of default value eg. jButton1ActionPerformed
    • EXPECTED RESULT:Source editor is opened. Check the generated code.
  2. Assure make all possible handlers
    1. Make all possible handlers of some component (check performance, refreshing of editor, event tab, ... )
    • EXPECTED RESULT:
  3. Assure renaming of event handlers
    1. Rename the same event handler more than once and check changes. Use "forbidden" names ( keywords, numbers, ... ). Use existing names of event handlers
    • EXPECTED RESULT:Handlers should be renamed correctly. If you use "forbidden" names, it is impossible to rename handler.
  4. Assure deleting of event handlers, delete the name of the event handler
    1. Delete an event handler of a component
    2. Rename event handler and delete the same handler
    • EXPECTED RESULT: Deleting works correctly.
  5. Assure multi selection of event handlers
    1. Select 'Events' tab and display handlers of any event.
    2. One event can have only one active event handler (there could be other reasonable event handler which can be set as active)
    3. Assure adding, multiple selecting and removing these handlers and see generating of proper code
    4. Handler names are displayed in pop-up under the event
    • EXPECTED RESULT:
  6. Assure property of all
    1. Change a property and observe code and visual changes
    • EXPECTED RESULT:


Test suite: Code tab

Purpose: Test if user can edit guarded bloc via code tab
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame) containing several components.

  1. Assure Code Generation
    1. There are two choices Generate Code and Serialize
    • EXPECTED RESULT:
  2. Assure Post Creation Code, Custom Creation Code, Post Init Code, Pre Creation Code, Pre Init Code, Post Listeners Code, Pre Adding Code, Post Adding Code, After All Set Code, Pre Declaration Code, Post Declaration Code
    1. These properties determines the init an creation code of its component
    2. Create some code in all of this properties and assure changes in Source Editor, save and compile file
    • EXPECTED RESULT:
  3. Assure the Serialize To property
    1. You can specify the file into which the component will be serialized (the Code Generation property should be set to Serialize)
    • EXPECTED RESULT:
  4. Assure Variable Name
    1. Assure visual appearance after set new name
    • EXPECTED RESULT:
  5. Assure setting Top-node properties
    1. In Component Navigator select the main container node ([JFrame]) and change properties : Position and size - (Form position, Form Size, Form Size Policy), Generating Code - (Generate Size, Generate Center, Generate Position)
    • EXPECTED RESULT:


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo