Examples of JTextComponentFixture


Examples of org.fest.swing.fixture.JTextComponentFixture

  }
 
  @Test
  public void testInitSessionTZCheckBox() {
    JCheckBoxFixture initSessionTimezoneCheckBox = fixture.checkBox("initSessionTimezoneCheckBox");
    JTextComponentFixture sessionTimezoneTextField = fixture.textBox("sessionTimezoneTextField");

    initSessionTimezoneCheckBox.uncheck();
    initSessionTimezoneCheckBox.check();
    initSessionTimezoneCheckBox.uncheck();

    sessionTimezoneTextField.requireDisabled();
   
    initSessionTimezoneCheckBox.check();
   
    sessionTimezoneTextField.requireEnabled();   
   
  }
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    }
   }

  @Test
  public void testCustomQTCheckbox() {
    JTextComponentFixture lineCommentTextField = fixture.textBox("lineCommentTextField");
    JTextComponentFixture statementSeparatorTextField = fixture.textBox("statementSeparatorTextField");
   
    useCustomQTCheckBox.uncheck();
    useCustomQTCheckBox.check();
    useCustomQTCheckBox.uncheck();
   
    lineCommentTextField.requireDisabled();
    statementSeparatorTextField.requireDisabled();
   
    useCustomQTCheckBox.check();
    lineCommentTextField.requireEnabled();
    statementSeparatorTextField.requireEnabled();   
 
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    cell2.requireValue("1");
   
    buttonA.uncheck();
    JRadioButtonFixture buttonI = new Query().accessibleNameMatches("Test Value: ").radioButtonIn(fixture);
    buttonI.check();
    JTextComponentFixture textFixture = new Query().textBoxIn(fixture);
    textFixture.enterText("2");
    manifestation.updateFromFeed(data);
    cell.requireValue("2");
    cell2.requireValue("2");
   
   
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

        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();
       
        textFixture.focus();
        textFixture.enterText("123");
        titleCheckBox.focus();
        Mockito.verify(mockCanvasManifestation,Mockito.times(persistentCount)).fireFocusPersist();

        // check that selecting the border color call persistence
        JComboBoxFixture colorFixture = window.comboBox(new ComboBoxMatcher("Color:"));
        colorFixture.selectItem(2);
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();

        window.toggleButton(new JToggleButtonMatcher("All borders")).click();
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        // check the no border button state
        window.toggleButton(new JToggleButtonMatcher("No borders")).click();
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        window.comboBox(new ComboBoxMatcher("panelTitleFontComboBox")).selectItem("Serif");
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        PANEL_TITLE_FONT_SIZE_SPINNER.spinnerIn(window).select(18);
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
        persistentCount++;
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleBold")).click();
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
        persistentCount++;
       
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleItalic")).click();
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
      
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleUnderline")).click();
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        window.comboBox(new ComboBoxMatcher("panelTitleFontColorComboBox")).selectItem(2);
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        window.comboBox(new ComboBoxMatcher("panelTitleBackgroundColorComboBox")).selectItem(2);
        Mockito.verify(mockCanvasManifestation,Mockito.times(++persistentCount)).fireFocusPersist();
       
        controlPanel.informZeroPanelsSelected();
        titleCheckBox.requireDisabled();
        textFixture.requireDisabled();
        window.toggleButton(new JToggleButtonMatcher("All borders")).requireDisabled();
        window.button(new JButtonMatcher("Align to bottom edge")).requireDisabled();
        window.comboBox(new ComboBoxMatcher("panelTitleFontComboBox")).requireDisabled();
        PANEL_TITLE_FONT_SIZE_SPINNER.spinnerIn(window).requireDisabled();
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleBold")).requireDisabled();
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleItalic")).requireDisabled();
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleUnderline")).requireDisabled();
        window.comboBox(new ComboBoxMatcher("panelTitleFontColorComboBox")).requireDisabled();
        window.comboBox(new ComboBoxMatcher("panelTitleBackgroundColorComboBox")).requireDisabled();
       
        controlPanel.informMultipleViewPanelsSelected(Collections.<Panel>emptyList());
        titleCheckBox.requireEnabled();
        textFixture.requireDisabled();
        window.toggleButton(new JToggleButtonMatcher("All borders")).requireEnabled();
        window.button(new JButtonMatcher("Align to bottom edge")).requireEnabled();
        window.comboBox(new ComboBoxMatcher("panelTitleFontComboBox")).requireEnabled();
        PANEL_TITLE_FONT_SIZE_SPINNER.spinnerIn(window).requireEnabled();
        window.toggleButton(new JToggleButtonMatcher("panelTitleFontStyleBold")).requireEnabled();
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    private volatile String enterText = null;

    private void tstChromoNav(String chromoText) throws Exception {
        registerEventHandler(1);

        JTextComponentFixture searchFixture = frame.textBox("searchTextField");
        searchFixture.deleteText();
        this.enterText = chromoText;

        //Make sure search box has focus
        searchFixture.focus();
        searchFixture.requireFocused();
        searchFixture.requireEmpty();

        searchFixture.enterText(chromoText);
        frame.button("goButton").click();
    }
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    public void showDefaultDialog() throws Exception {
        showDialog(TITLE);
        assertEquals(TITLE, windowFixture.component().getTitle());
       
        // check text area is present and correct size
        JTextComponentFixture textBox = windowFixture.textBox();
        assertTrue(textBox.component() instanceof JTextArea);
        JTextArea textArea = (JTextArea) textBox.component();
        assertEquals(JTextReporter.DEFAULT_TEXTAREA_ROWS, textArea.getRows());
        assertEquals(JTextReporter.DEFAULT_TEXTAREA_COLS, textArea.getColumns());
       
        // check all buttons are present
        getButton("Copy to clipboard");
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

        showDialog();
        ((DialogFixture) windowFixture).requireModal();
        assertEquals(JCRSChooser.DEFAULT_TITLE, windowFixture.component().getTitle());

        // The text box should be editable and initially empty
        JTextComponentFixture textBox = windowFixture.textBox();
        assertNotNull(textBox);
        textBox.requireEditable();
        textBox.requireText("");

        // The list should have as many items as there are authority codes
        JListFixture list = windowFixture.list();
        assertNotNull(list);
        list.requireItemCount(CODES.size());
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    public void okButtonStateWithListSize() throws Exception {
        showDialog();
        JButtonFixture button = getButton("OK");

        // Filter to a single item - button should be enabled
        JTextComponentFixture textBox = windowFixture.textBox();
        textBox.enterText(UNIQUE_FILTER_STRING);
        windowFixture.robot.waitForIdle();
        button.requireEnabled();

        // Remove filter (no list selection) - button should be disabled
        textBox.deleteText();
        windowFixture.robot.waitForIdle();
        windowFixture.list().requireNoSelection();
        button.requireDisabled();
    }
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    }
   
    @Test
    public void ensureTextAreaIsDisplayed() {
        createAndShow(false);
        JTextComponentFixture textArea = getDialogTextArea();
        assertNotNull(textArea);
        textArea.requireVisible();
    }
View Full Code Here

Examples of org.fest.swing.fixture.JTextComponentFixture

    private void assertTextDisplayExact(JAboutDialog.Category cat, String expected) {
        windowFixture.list().clickItem(cat.toString());
        windowFixture.robot.waitForIdle();
       
        JTextComponentFixture textArea = getDialogTextArea();
        textArea.requireText(expected);
    }
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.