Examples of waitForIdle()


Examples of abbot.tester.JComponentTester.waitForIdle()

    frame.pack();

    // Show home plan frame
    showWindow(frame);
    JComponentTester tester = new JComponentTester();
    tester.waitForIdle();   
    // Check home background image is empty
    assertEquals("Home background image isn't empty", null, home.getBackgroundImage());

    // 2. Open wizard to import a background image
    runAction(controller, HomeView.ActionType.IMPORT_BACKGROUND_IMAGE, tester);
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

   
    // 4. Check scale distance spinner value is empty
    assertEquals("Scale distance spinner isn't empty", null, scaleDistanceSpinner.getValue());
    assertFalse("Next button is enabled", nextFinishOptionButton.isEnabled());
    // Check scale spinner field has focus
    tester.waitForIdle();
    assertSame("Scale spinner doesn't have focus", ((JSpinner.DefaultEditor)scaleDistanceSpinner.getEditor()).getTextField(),
        KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner());   
    // Enter as scale
    tester.actionKeyString("100");   
    // Check next button is enabled
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

   
    // 5. Check origin x and y spinners value is 0
    assertEquals("Wrong origin x spinner value", new Float(0), xOriginSpinner.getValue());
    assertEquals("Wrong origin y spinner value", new Float(0), yOriginSpinner.getValue());
    assertTrue("Next button isn't enabled", nextFinishOptionButton.isEnabled());
    tester.waitForIdle();
    assertSame("Origin x spinner doesn't have focus", ((JSpinner.DefaultEditor)xOriginSpinner.getEditor()).getTextField(),
        KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner());   
    // Change origin
    tester.actionKeyString("10");   
    assertEquals("Wrong origin x spinner value", 10f, xOriginSpinner.getValue());
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

    frame.pack();

    // Show home plan frame
    showWindow(frame);
    JComponentTester tester = new JComponentTester();
    tester.waitForIdle();
    // Transfer focus to plan view
    planComponent.requestFocusInWindow();
    tester.waitForIdle();
   
    // Check plan view has focus
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

    showWindow(frame);
    JComponentTester tester = new JComponentTester();
    tester.waitForIdle();
    // Transfer focus to plan view
    planComponent.requestFocusInWindow();
    tester.waitForIdle();
   
    // Check plan view has focus
    assertTrue("Plan component doesn't have the focus", planComponent.isFocusOwner());
    // Check default camera is the top camera
    assertSame("Default camera isn't top camera",
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(-90.4595f, 891.3434f, 931.5356f,
        (float)Math.PI - (float)Math.PI / 60 + (float)Math.PI / 12, (float)Math.PI / 4 + (float)Math.PI / 120, home.getCamera());
   
    // 6. View from observer
    runAction(controller, HomePane.ActionType.VIEW_FROM_OBSERVER, tester);
    tester.waitForIdle();
    ObserverCamera observerCamera = home.getObserverCamera();
    // Check camera is the observer camera
    assertSame("Camera isn't observer camera", observerCamera, home.getCamera());
    // Check default camera location and angles
    assertCoordinatesAndAnglesEqualCameraLocationAndAngles(50, 50, 170,
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

        public void run() {
          // Click on Finish to hide dialog box in Event Dispatch Thread
          nextFinishOptionButton2.doClick();
        }
      });
    tester.waitForIdle();
    assertFalse("Import texture wizard still showing", textureWizardDialog.isShowing());
    // Check the list of available textures has the same texture count
    // and a new selected texture
    assertEquals("Wrong texture count in list", textureCount, availableTexturesList.getModel().getSize());
    assertEquals("No selected texture in list", 1, availableTexturesList.getSelectedValues().length);
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

        public void run() {
          // Display confirm dialog box later in Event Dispatch Thread to avoid blocking test thread
          deleteButton.doClick();       
        }
      });
    tester.waitForIdle();
    // Wait for confirm dialog to be shown
    final String confirmDeleteSelectedCatalogTextureDialogTitle = preferences.getLocalizedString(
        TextureChoiceComponent.class, "confirmDeleteSelectedCatalogTexture.title");
    tester.waitForFrameShowing(new AWTHierarchy(), confirmDeleteSelectedCatalogTextureDialogTitle);
    // Check dialog box is displayed
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

                  confirmDeleteSelectedCatalogTextureDialogTitle);
            }
          });
    assertTrue("Confirm dialog not showing", confirmDialog.isShowing());
    doClickOnOkInDialog(confirmDialog, tester);
    tester.waitForIdle();
    // Check the list of available textures has one less texture and no selected texture
    assertEquals("Wrong texture count in list", textureCount - 1, availableTexturesList.getModel().getSize());
    assertEquals("No selected texture in list", 0, availableTexturesList.getSelectedValues().length);
    // Check delete button is disabled
    assertFalse("Delete button isn't disabled", deleteButton.isEnabled());
View Full Code Here

Examples of abbot.tester.JComponentTester.waitForIdle()

    tester.actionKeyPress(KeyEvent.VK_SHIFT);
    Wall wall7 = orderedWalls.get(7);
    assertCoordinatesEqualWallPoints(wall7.getXStart(), wall7.getYStart(),
        planComponent.convertXPixelToModel(200),
        planComponent.convertYPixelToModel(200), wall7);
    tester.waitForIdle();
    tester.actionKeyRelease(KeyEvent.VK_SHIFT);
    // Take control again with keyboard and close the walls square
    tester.actionKeyStroke(KeyEvent.VK_ENTER);
    tester.actionKeyString("100");
    tester.actionKeyStroke(KeyEvent.VK_TAB);
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.