TS 60 componentpalette

Form Editor - Component Palette Test Specification

Author: Jana Maleckova, Jaromir Uhrik
Version: 6.0
Lastupdate: 2007/01/10
Introduction:

Contents

Test suite: Component Palette

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame) containg several components.

  1. Test Component Palette - Small Palette
    1. Invoke popup menu over Selection button in the toolbar on the top of the Designer.
    2. Push Show Add Button.
    • EXPECTED RESULT: The button with '+' icon appears in the toolbar.
  2. Add beans to Component Palette category from JAR file
    1. Push "Palette Manager" icon in the form designer toolbar.
    2. Press "Add drom JAR..." button.
    3. Select resource (.jar file) that contains the beans and press 'Next'
    4. Select first bean, hold Shift and select last bean - all beans are selected.
    5. Push 'Next'.
    6. Select category Beans.
    7. Push Finish and Close the Palette Manager.
    • EXPECTED RESULT: Palette Beans contains all added beans.
  3. Test Selection mode
    1. Push Selection Mode.
    2. Click in Form Designer.
    • EXPECTED RESULT: JFrame in Form Designer and the same node (JFrame) is selected in Component Inspector.
  4. Test Add mode
    1. Push Add Mode.
    2. From opened popup menu select Swing Controls -> JButton.
    • EXPECTED RESULT: On the right of status label there is icon of JButton and label JButton.
  5. Test Connection mode
    • Comments: TODO
    1. Push Connection Mode.
    2. Click in Component Inspector on JFrame.
    3. Click in Form Designer on jButton1.
    • EXPECTED RESULT: Dialog Connection Wizard arise. Close it.
  6. Switching categories
    1. Switch to category Swing Containers.
    2. Switch to category Swing Controls.
    3. Switch to category Swing Menus.
    4. Switch to category Swing Windows.
    5. Switch to category AWT.
    6. Switch to category Beans.
    7. Switch to category Java Persistence.
    • EXPECTED RESULT: All categories contain appropriate components.
  7. Show names of components
    1. Invoke popup menu over component JLabel from category Swing Controls.
    2. Select Show Component Names.
    • EXPECTED RESULT: Names and Icons of components from selected category is shown.
  8. Selecting components
    1. Select randomly all components in Component Palette from all categories.
    • EXPECTED RESULT: Each component is selected, previously selected component is unselected. Selection Mode is unselected too. When add mode is on, the selected component icon and name is shown in designers' toolbar (on the right).
  9. Selecting components, Names
    1. Invoke popup menu over component Label from category AWT.
    2. Select Show Names.
    3. Select randomly all components in Component Palette from all categories.
    • EXPECTED RESULT: Each component is selected, previously selected component is unselected. Selection Mode is unselected.
  10. Delete component
    1. Invoke popup menu on component Button from Component Palette category AWT.
    2. Push Delete.
    3. In opened dialog Confirm Palette Removal push Ok.
    • EXPECTED RESULT: Category AWT doesn't contain component Button.
  11. Move Left/Right components
    • Comments: TODO
    1. Invoke popup menu on component ButtonGroup from Component Palette category Swing Controls.
    2. Push Change Components Order.
    3. Select the ButtonGroup and press Move Up.
    4. Invoke popup menu on component JRadioButton from Component Palette category Swing Containers.
    5. Push Change Components Order.
    6. Select the JRadioButton and push Move Down.
    7. Push OK.
    • EXPECTED RESULT: Category Swing Controls contains components in this order : JLabel, JButton, JToggleButton, JCheckBox, ButtonGroup, JComboBox, JRadioButton, ....
  12. Cut/Paste component
    1. Invoke popup menu on component JInternalFrame from Component Palette category Swing Containers.
    2. Push Cut.
    3. Invoke popup menu on category Beans.
    4. Push Paste.
    • EXPECTED RESULT: Category Swing Containers doesn't contain component JInternalFrame but category Beans contains it.
  13. Copy/Paste component
    1. Invoke popup menu on component Button from Component Palette category AWT.
    2. Push Copy.
    3. Invoke popup menu on category Beans.
    4. Push Paste.
    • EXPECTED RESULT: Category AWT contains component Button and category Beans contains it, too.
  14. Move/Delete/Rename categories
    1. Push Swing Controls in palette.
    2. Invoke popup menu on category AWT from Component Palette.
    3. Push Change Categories Order.
    4. Select the Swing Controls and press Move Down.
    5. Push OK.
    6. Invoke popup menu on category AWT from Component Palette.
    7. Push rename.
    8. Type 'AWTrename'.
    9. Invoke popup menu on category Containers from Component Palette.
    10. Push delete and press OK.
    • EXPECTED RESULT: Category Containers is missed, category AWT has changed name, Swing Controls category is one position down.
  15. Check tooltips of components
    1. Try all components in all categories.
    • EXPECTED RESULT: Correct tooltip must appear.


Test suite: Small Palette

Purpose: Small palette check.
Setup: Invoke popup menu over Selection button in the toolbar on the top of the Designer and push Show Add Button.

  1. Small Palette - Categories check
    1. Press Designer's small palette button ('+' icon).
    2. Same categories all available as in 'Large palette'.
    • EXPECTED RESULT: Swing Controls, Containers, AWT and Beans categories are in menu and all have submenus.
  2. Small Palette vs. Large Palette
    1. Select any component from 'Small palette' and assure it is selected in 'Large palette' too.
    2. The Toolbar of Designer must dynamicly show the selected component on the right of the bar.
    • EXPECTED RESULT:
  3. Small Palette - Add All Components
    • Comments: TODO
    1. Try to use all items of the 'Small Palette' and add them into the form step by step.
    • EXPECTED RESULT: Behavior must be same as that of 'Large Palette'.
  4. Remove SmallPalette button
    • Comments: TODO
    1. Invoke popup menu over Selection button in the toolbar on the top of the Designer.
    2. Push Show Add Button.
    • EXPECTED RESULT: The button with '+' icon vanishes from the toolbar.


Test suite: Test action

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication).

  1. Test action - JApplet
    1. Create new JApplet.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  2. Test action - JDialog
    1. Create new JDialog.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  3. Test action - JFrame
    1. Create new JFrame.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  4. Test action - JInternalFrame
    1. Create new JInternalFrame.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  5. Test action - Applet
    1. Create new Applet.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  6. Test action - Dialog
    1. Create new Dialog.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  7. Test action - Frame
    1. Create new Frame.
    2. Add components.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form (positions and properties of components).
  8. Test action - table
    1. Create new JFrame.
    2. Add JTable.
    3. Push Test form.
    • EXPECTED RESULT: Check opened form - test JTable component, check source code.
  9. Test action - change selection
    1. Create new JFrame.
    2. Add JCheckBox1, JRadioButton1.
    3. Set 'selected' property for JCheckBox1.
    4. Set 'selected' property for JRadioButton1.
    5. Push Test form.
    • EXPECTED RESULT: Check components (JCheckBox1, JRadioButton1) are selected.


Test suite: Connection Wizard test

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g JFrame). Add JButton and JLabel with default names to JFrame. Press toggle button 'Connection Mode' on.

  1. Connection wizard - Set Property
    1. Select jButton1.
    2. Select jLabel1.
    3. Select in tree "action" "actionPerformed", click Next.
    4. Select setProperty.
    5. Select property 'text', click Next.
    6. Type value 'attempt'.
    • EXPECTED RESULT: Properly generated code.
  2. Connection wizard - Method Call
    • Comments: TODO
    1. Select jButton1.
    2. Select jLabel1.
    3. Select in tree "action" "actionPerformed", click Next.
    4. Select Method call.
    5. Select method setText(String), click Next.
    6. Type value 'attempt'.
    • EXPECTED RESULT: Properly generated code.
  3. Connection wizard - User Code
    • Comments: TODO
    1. Select jButton1.
    2. Select jLabel1.
    3. Select in tree "action" "actionPerformed", click Next.
    4. Select User code.
    5. Select method setText(String), click Finish.
    • EXPECTED RESULT: Properly generated code.

}}
}}

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