Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.FrameFixture.textBox()


        JCheckBoxFixture titleCheckBox = window.checkBox(new CheckBoxMatcher("Panel Title Bar"));
        titleCheckBox.click();
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        // check that both focus lost and enter will trigger focus for text fields
        JTextComponentFixture textFixture = window.textBox(new TextFieldMatcher("Panel Title:"));
        textFixture.enterText("abc").pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
        titleCheckBox.focus();
        // should not fire persistence event if the text hasn't changed
        Mockito.verify(mockCanvasManifestation,Mockito.times(persistentCount)).fireFocusPersist();
View Full Code Here


  @Test
  public void testMinMax() {
    FrameFixture window = WindowFinder.findFrame(WINDOW_TITLE).using(robot);

    verifyMinMax(null, null);   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("10");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("20");
    // Just changing text shouldn't change property
    verifyMinMax(null, null);
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));   
    verifyMinMax("10", "20");   
View Full Code Here

  public void testMinMax() {
    FrameFixture window = WindowFinder.findFrame(WINDOW_TITLE).using(robot);

    verifyMinMax(null, null);   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("10");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("20");
    // Just changing text shouldn't change property
    verifyMinMax(null, null);
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));   
    verifyMinMax("10", "20");   
View Full Code Here

    verifyMinMax(null, null);   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("10");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("20");
    // Just changing text shouldn't change property
    verifyMinMax(null, null);
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));   
    verifyMinMax("10", "20");   

    // Bad data should not make changes
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("cat");
View Full Code Here

    verifyMinMax(null, null);
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));   
    verifyMinMax("10", "20");   

    // Bad data should not make changes
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("cat");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("dog");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
View Full Code Here

    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));   
    verifyMinMax("10", "20");   

    // Bad data should not make changes
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("cat");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("dog");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
   
View Full Code Here

    verifyMinMax("10", "20");   

    // Bad data should not make changes
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("cat");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("dog");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
   
    // Min > Max should not change settings
View Full Code Here

    // Bad data should not make changes
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("cat");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("dog");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
   
    // Min > Max should not change settings
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
View Full Code Here

    // Bad data should not make changes
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("cat");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("dog");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
   
    // Min > Max should not change settings
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("30");
View Full Code Here

    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("dog");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
   
    // Min > Max should not change settings
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).enterText("30");
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).deleteText();
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MAX).enterText("20");   
    window.textBox(GraphicalSettings.GRAPHICAL_FOREGROUND_MIN).pressAndReleaseKey(KeyPressInfo.keyCode(KeyEvent.VK_ENTER));
    verifyMinMax("10", "20");
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.