Package abbot.tester

Examples of abbot.tester.JComponentTester.click()


    // Check current step is image
    assertStepShowing(panel, true, false, false);   
   
    // 3. Choose tested image
    String imageChoiceOrChangeButtonText = imageChoiceOrChangeButton.getText();
    tester.click(imageChoiceOrChangeButton);
    // Wait 100 ms to let time to Java to load the image
    Thread.sleep(100);
    // Check choice button text changed
    assertFalse("Choice button text didn't change",
        imageChoiceOrChangeButtonText.equals(imageChoiceOrChangeButton.getText()));
View Full Code Here


    // Click on next button
    WizardPane view = (WizardPane)TestUtilities.findComponent(wizardDialog, WizardPane.class);
    // Retrieve wizard view next button
    final JButton nextFinishOptionButton = (JButton)TestUtilities.getField(view, "nextFinishOptionButton");
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());
    tester.click(nextFinishOptionButton);
    // Check current step is scale
    assertStepShowing(panel, false, true, false);
   
    // 4. Check scale distance spinner value is empty
    assertEquals("Scale distance spinner isn't empty", null, scaleDistanceSpinner.getValue());
View Full Code Here

        KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner());   
    // Enter as scale
    tester.actionKeyString("100");   
    // Check next button is enabled
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());
    tester.click(nextFinishOptionButton);
    // Check current step is origin
    assertStepShowing(panel, false, false, true);
   
    // 5. Check origin x and y spinners value is 0
    assertEquals("Wrong origin x spinner value", new Float(0), xOriginSpinner.getValue());
View Full Code Here

        KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner());   
    // Change origin
    tester.actionKeyString("10");   
    assertEquals("Wrong origin x spinner value", 10f, xOriginSpinner.getValue());

    tester.click(nextFinishOptionButton);
    // Check home has a background image
    BackgroundImage backgroundImage = home.getBackgroundImage();
    assertTrue("No background image in home", backgroundImage != null);
    assertEquals("Background image wrong scale", 100f, backgroundImage.getScaleDistance());
    assertEquals("Background image wrong x origin", 10f, backgroundImage.getXOrigin());
View Full Code Here

    assertTrue("Floor check box isn't checked", floorVisibleCheckBox.getValue());
    assertTrue("Ceiling check box isn't checked", ceilingVisibleCheckBox.getValue());
   
    // Enter a name and unchecked boxes
    nameTextField.setText("Test");
    tester.click(areaVisibleCheckBox);
    tester.click(floorVisibleCheckBox);
    tester.click(ceilingVisibleCheckBox);
   
    final JOptionPane attributesOptionPane = (JOptionPane)TestUtilities.findComponent(
        attributesDialog, JOptionPane.class);
View Full Code Here

    assertTrue("Ceiling check box isn't checked", ceilingVisibleCheckBox.getValue());
   
    // Enter a name and unchecked boxes
    nameTextField.setText("Test");
    tester.click(areaVisibleCheckBox);
    tester.click(floorVisibleCheckBox);
    tester.click(ceilingVisibleCheckBox);
   
    final JOptionPane attributesOptionPane = (JOptionPane)TestUtilities.findComponent(
        attributesDialog, JOptionPane.class);
    tester.invokeAndWait(new Runnable() {
View Full Code Here

   
    // Enter a name and unchecked boxes
    nameTextField.setText("Test");
    tester.click(areaVisibleCheckBox);
    tester.click(floorVisibleCheckBox);
    tester.click(ceilingVisibleCheckBox);
   
    final JOptionPane attributesOptionPane = (JOptionPane)TestUtilities.findComponent(
        attributesDialog, JOptionPane.class);
    tester.invokeAndWait(new Runnable() {
        public void run() {
View Full Code Here

    // Show home plan frame
    showWindow(frame);
   
    // 2. Use CREATE_WALLS mode
    JComponentTester tester = new JComponentTester();
    tester.click(frame.createWallsButton);
    PlanComponent planComponent = (PlanComponent)
        frame.homeController.getPlanController().getView();
    // Click at (30, 30), (220, 30), (270, 80), (270, 170), (30, 170)
    // then double click at (30, 30) with no magnetism
    tester.actionKeyPress(KeyEvent.VK_SHIFT);
View Full Code Here

    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    // Check 5 walls were added to home plan
    assertEquals("Wrong walls count", 5, frame.home.getWalls().size());

    // 3. Use SELECTION mode
    tester.click(frame.selectButton);
    // Select the first piece in catalog tree
    JTree catalogTree = (JTree)
        frame.homeController.getFurnitureCatalogController().getView();
    catalogTree.expandRow(0);
    catalogTree.addSelectionInterval(1, 1);
View Full Code Here

    JTree catalogTree = (JTree)
        frame.homeController.getFurnitureCatalogController().getView();
    catalogTree.expandRow(0);
    catalogTree.addSelectionInterval(1, 1);
    // Click on Add furniture button
    tester.click(frame.addButton);
    // Check home contains one selected piece
    tester.waitForIdle();
    assertEquals("Wrong piece count",
        1, frame.home.getFurniture().size());
    assertEquals("Wrong selected items count",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.