Package org.fest.swing.test.recorder

Examples of org.fest.swing.test.recorder.ClickRecorder


    fixture = textBox.showPopupMenu();
  }

  @Test
  public void should_find_first_level_JMenuItem_by_path() {
    ClickRecorder recorder = attachTo(window.fileMenu);
    JMenuItemFixture menuItem = fixture.menuItemWithPath("File");
    menuItem.click();
    assertThat(recorder).clicked(LEFT_BUTTON).timesClicked(1);
  }
View Full Code Here


    assertThat(recorder).clicked(LEFT_BUTTON).timesClicked(1);
  }

  @Test
  public void should_find_second_level_JMenuItem_by_path() {
    ClickRecorder recorder = attachTo(window.openMenu);
    if (isOSX()) {
      fixture.menuItemWithPath("File").click();
    }
    JMenuItemFixture menuItem = fixture.menuItemWithPath("File", "Open");
    menuItem.click();
View Full Code Here

  @Test
  public void should_select_menu_item_from_menu_bar() {
    JMenuItem menuItem = window.menuItemFromMenuBar;
    JMenuItemFixture fixture = fixtureFor(menuItem);
    pauseBeforeShowingMenu();
    ClickRecorder clickRecorder = attachTo(menuItem);
    fixture.click();
    assertThat(clickRecorder).wasClicked();
  }
View Full Code Here

  public void should_select_menu_item_from_popup_menu() {
    JMenuItem menuItem = window.menuItemFromPopupMenu;
    JMenuItemFixture fixture = fixtureFor(menuItem);
    pauseBeforeShowingMenu();
    robot.showPopupMenu(window.textField);
    ClickRecorder clickRecorder = attachTo(menuItem);
    fixture.click();
    assertThat(clickRecorder).wasClicked();
  }
View Full Code Here

  }

  @Test
  public void should_click_path() {
    showWindow();
    ClickRecorder recorder = ClickRecorder.attachTo(tree);
    driver.clickPath(tree, "root/branch1/branch1.1/branch1.1.1", RIGHT_BUTTON);
    assertThat(recorder).clicked(RIGHT_BUTTON).timesClicked(1);
    String clickedPath = pathAtPoint(tree, recorder.pointClicked(), driver.separator());
    assertThat(clickedPath).isEqualTo("root/branch1/branch1.1/branch1.1.1");
  }
View Full Code Here

  }

  @Test
  public void should_click_column() {
    showWindow();
    ClickRecorder recorder = attachTo(tableHeader);
    driver.clickColumn(tableHeader, index);
    recorder.wasClicked();
    assertThatColumnWasClicked(recorder, index);
  }
View Full Code Here

    frame.show();
  }

  @Test
  public void should_scroll_and_click_JButton() {
    ClickRecorder clickRecorder = ClickRecorder.attachTo(window.button);
    frame.button("button").click();
    assertThat(clickRecorder).wasClicked();
  }
View Full Code Here

*/
public class JTreeDriver_rightClickPath_Test extends JTreeDriver_clickCell_TestCase {
  @Test
  public void should_right_click_path() {
    showWindow();
    ClickRecorder recorder = ClickRecorder.attachTo(tree);
    driver.rightClickPath(tree, "root/branch1/branch1.1/branch1.1.1");
    assertThat(recorder).wasClickedWith(RIGHT_BUTTON).timesClicked(1);
    String clickedPath = pathAtPoint(tree, recorder.pointClicked(), driver.separator());
    assertThat(clickedPath).isEqualTo("root/branch1/branch1.1/branch1.1.1");
  }
View Full Code Here

*/
public class ComponentDriver_clickComponent_Test extends ComponentDriver_TestCase {
  @Test
  public void should_click_Component() {
    showWindow();
    ClickRecorder clickRecorder = ClickRecorder.attachTo(window.button);
    driver.click(window.button);
    assertThat(clickRecorder).wasClicked().clickedAt(centerOf(window.button)).timesClicked(1);
  }
View Full Code Here

    assertThat(clickRecorder).wasClicked().clickedAt(centerOf(window.button)).timesClicked(1);
  }

  @Test
  public void should_throw_error_if_Component_is_disabled() {
    ClickRecorder clickRecorder = ClickRecorder.attachTo(window.button);
    disableButton();
    try {
      driver.click(window.button);
      failWhenExpectingException();
    } catch (IllegalStateException e) {
View Full Code Here

TOP

Related Classes of org.fest.swing.test.recorder.ClickRecorder

Copyright © 2018 www.massapicom. 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.