예제 #1
0
  @Test
  @InstallFile("samples/basicInstall/basicInstall.xml")
  public void testBasicInstall() throws Exception {
    File installPath = HelperTestMethod.prepareInstallation(installData);
    // Lang picker
    HelperTestMethod.clickDefaultLang(languageDialog);

    installerFrameFixture =
        HelperTestMethod.prepareFrameFixture(installerFrame, installerController);
    Thread.sleep(600);
    // Hello panel
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    Thread.sleep(600);
    // Info Panel
    installerFrameFixture.textBox(GuiId.INFO_PANEL_TEXT_AREA.id).requireText("A readme file ...");
    installerFrameFixture.button(GuiId.BUTTON_PREV.id).requireVisible();
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    installerFrameFixture.button(GuiId.BUTTON_PREV.id).requireEnabled();
    Thread.sleep(300);
    // Licence Panel
    installerFrameFixture
        .textBox(GuiId.LICENCE_TEXT_AREA.id)
        .requireText("(Consider it as a licence file ...)");
    installerFrameFixture.radioButton(GuiId.LICENCE_NO_RADIO.id).requireSelected();
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).requireDisabled();
    installerFrameFixture.radioButton(GuiId.LICENCE_YES_RADIO.id).click();
    Thread.sleep(300);
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    // Target Panel
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    Thread.sleep(1000);
    installerFrameFixture.optionPane().requireWarningMessage();
    installerFrameFixture.optionPane().okButton().click();
    // Packs Panel
    Thread.sleep(300);
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    // Install Panel
    HelperTestMethod.waitAndCheckInstallation(installData, installPath);

    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    // Finish panel
    installerFrameFixture.button(GuiId.FINISH_PANEL_AUTO_BUTTON.id).click();
    Thread.sleep(800);
    installerFrameFixture
        .fileChooser(GuiId.FINISH_PANEL_FILE_CHOOSER.id)
        .fileNameTextBox()
        .enterText("auto.xml");
    Thread.sleep(300);
    installerFrameFixture.fileChooser(GuiId.FINISH_PANEL_FILE_CHOOSER.id).approve();
    assertThat(new File(installPath, "auto.xml").exists(), Is.is(true));
    //        installerFrameFixture.button(GuiId.BUTTON_QUIT.id).click();
  }
예제 #2
0
 @Test
 @InstallFile("samples/silverpeas/silverpeas.xml")
 public void testSilverpeas() throws Exception {
   languageDialog.initLangPack();
   installerFrameFixture =
       HelperTestMethod.prepareFrameFixture(installerFrame, installerController);
   installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
   installerFrameFixture.requireVisible();
 }
예제 #3
0
  @Test
  @InstallFile("samples/substanceLaf/substanceLaf.xml")
  public void testSubstanceLaf() throws Exception {
    languageDialog.initLangPack();
    installerFrameFixture =
        HelperTestMethod.prepareFrameFixture(installerFrame, installerController);

    // Hello panel
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    installerFrameFixture.requireVisible();
    // Finish panel
  }
예제 #4
0
  @Test
  @InstallFile("samples/helloAndFinish.xml")
  public void testHelloAndFinishPanels() throws Exception {
    Image image = icons.get("JFrameIcon").getImage();
    assertThat(image, IsNull.<Object>notNullValue());

    languageDialog.initLangPack();
    installerFrameFixture =
        HelperTestMethod.prepareFrameFixture(installerFrame, installerController);

    // Hello panel
    //        installerFrameFixture.requireSize(new Dimension(640, 480));
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    installerFrameFixture.requireVisible();
    // Finish panel
  }
예제 #5
0
  @Before
  public void setUp() throws PatrimonioException, SQLException {
    robot = BasicRobot.robotWithNewAwtHierarchy();
    robot.settings().delayBetweenEvents(5);

    window = new FrameFixture(robot, new Main2());
    window.show(new Dimension(900, 500)); // shows the frame to test

    sala = new Sala("code", "Sala para testes de aceitacao", "123");
    SalaDAO.getInstance().incluir(sala);

    index = SalaDAO.getInstance().buscarTodos().size() - 1;

    window.button("Sala").click();
    dialog = window.dialog("SalaView");
  }
 public void clickAddKeyPointButton() {
   JButtonFixture addKeyPointButton = focusedWindow.button("Add Key Point");
   addKeyPointButton.click();
 }
 public void clickMediaCaptureButton() {
   JButtonFixture mediaCaptureButton = focusedWindow.button("Media Capture...");
   mediaCaptureButton.click();
 }
 public void clickSubGraphColumnButton() {
   JButtonFixture subGraphColumnButton = focusedWindow.button("Sub Column");
   subGraphColumnButton.click();
 }
 public void clickAddGraphColumnButton() {
   JButtonFixture addGraphColumnButton = focusedWindow.button("Add Column");
   addGraphColumnButton.click();
 }
 public void clickRemoveEmptyGraphButton() {
   JButtonFixture removeEmptyGraphButton = focusedWindow.button("Remove Empty");
   removeEmptyGraphButton.click();
 }
 public void clickNewGraphButton() {
   JButtonFixture newGraphButton = focusedWindow.button("New Graph");
   newGraphButton.click();
 }
 public void clickImportDataButton() {
   JButtonFixture importDataButton = focusedWindow.button("Import Data...");
   importDataButton.click();
 }
예제 #13
0
 @Test
 public void testDownloadCancelButton() {
   System.out.println("testopenDownloadDialog");
   mFrame.button("btnDownloadData").click().requireEnabled();
   mFrame.dialog("dsDialog").button("canceliButton").click().requireEnabled();
 }
 public void clickSetOutPointButton() {
   JButtonFixture setOutPointButton = focusedWindow.button("Set Out Point");
   setOutPointButton.click();
 }
 public void clickExportSnapshotButton() {
   JButtonFixture exportSnapshotButton = focusedWindow.button("Export Snapshot...");
   exportSnapshotButton.click();
 }
 public void clickGotoOutPointButton() {
   JButtonFixture gotoOutPointButton = focusedWindow.button("Goto Out Point");
   gotoOutPointButton.click();
 }
 public void clickStepForwardButton() {
   JButtonFixture stepForwardButton = focusedWindow.button("Step Forward");
   stepForwardButton.click();
 }
 public void clickStopButton() {
   JButtonFixture stopButton = focusedWindow.button("Stop");
   stopButton.click();
 }
 public void clickPlayButton() {
   JButtonFixture playButton = focusedWindow.button("Play");
   playButton.click();
 }
 public void clickSimulateButton() {
   JButtonFixture simulateButton = focusedWindow.button("Simulate");
   simulateButton.click();
 }
 public void clickToggleKeyModeButton() {
   JButtonFixture toggleKeyModeButton = focusedWindow.button("Toggle Key Mode");
   toggleKeyModeButton.click();
 }
 public void clickZoomOutButton() {
   JButtonFixture zoomOutButton = focusedWindow.button("Zoom Out");
   zoomOutButton.click();
 }
예제 #23
0
 protected void clickButton(String button) {
   window.button(button).click();
 }
 public void clickPrintGraphsButton() {
   JButtonFixture printGraphsButton = focusedWindow.button("Print Graphs");
   printGraphsButton.click();
 }
예제 #25
0
 @Test
 public void testBactButton() {
   previewBoardFrame.button("Back").click();
 }
 // Buttons
 public void clickExportDataButton() {
   JButtonFixture exportDataButton = focusedWindow.button("Export Data...");
   exportDataButton.click();
 }