Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.JTableFixture


  }

  @Test
  public void editByDoubleClick() throws Exception {

    JTableFixture tableFixture = dialogFixture.table("TableOrder");
    int count = tableFixture.target.getModel().getRowCount();
    assertEquals(true, count != 0);

    tableFixture.cell(row(0).column(1)).doubleClick();

    dialogFixture.robot.finder().findByName("EditOrderView");
  }
View Full Code Here


  }

  @Test
  public void newOrder() throws Exception {
    dialogFixture.show();
    JTableFixture tableFixture = dialogFixture.table("TableOrder");
    int count = tableFixture.target.getModel().getRowCount();
    assertEquals(true, count != 0);

    dialogFixture.button("AddOrder").click();
View Full Code Here

  }

  @Test
  public void newOrderWithTransportAndPackingComment() throws Exception {
    dialogFixture.show();
    JTableFixture tableFixture = dialogFixture.table("TableOrder");
    int count = tableFixture.target.getModel().getRowCount();
    assertEquals(true, count != 0);

    dialogFixture.button("AddOrder").click();
View Full Code Here

      listener.ancestorRemoved(null);
      manifestation.removeAncestorListener(listener);
    }
   
    FrameFixture fixture = showInFrame(manifestation, "test");
    JTableFixture tableFixture = fixture.table();
    FeedProvider.RenderingInfo ri = new FeedProvider.RenderingInfo(
        "1",
        Color.gray,
        "a",
        Color.gray,
        true
    );
    Mockito.when(provider.getRenderingInfo(Mockito.anyMap())).thenReturn(ri);
    Map<String, String> dataInfo = new HashMap<String,String>();
    dataInfo.put(FeedProvider.NORMALIZED_VALUE_KEY, "1");
    dataInfo.put(FeedProvider.NORMALIZED_RENDERING_INFO, ri.toString())
    Map<String, List<Map<String, String>>> data =
      Collections.singletonMap(provider.getSubscriptionId(),
          Collections.singletonList(dataInfo));
   
    Field f1 = InfoViewManifestation.class.getField("tableModel");
    f1.setAccessible(true);
    Object view = f1.get(manifestation);
   
    Field f2 = ValueModel.class.getField("eList");
    f2.setAccessible(true);
    f2.set(view, eList);

    ((ValueModel)view).clearModel();
   
    manifestation.updateFromFeed(data);
    JLabelFixture labelFixture = new Query().labelIn(fixture);
    labelFixture.requireText("1");
   
    JRadioButtonFixture buttonA = new Query().accessibleNameMatches("Alpha Value: ").radioButtonIn(fixture);
    buttonA.check();
    manifestation.updateFromFeed(data);
   
    JTableCellFixture cell = tableFixture.cell(row(0).column(2));
    JTableCellFixture cell2 = tableFixture.cell(row(1).column(2));
    cell.requireValue("1");
    cell2.requireValue("1");
   
    buttonA.uncheck();
    JRadioButtonFixture buttonI = new Query().accessibleNameMatches("Test Value: ").radioButtonIn(fixture);
View Full Code Here

        configurationPanel = new com.eviware.soapui.impl.wsdl.endpoint.DefaultEndpointStrategyConfigurationPanel(restService, strategy);
    }

    @Test
    public void updatesTableWithNewEndpoint() throws Exception {
        JTableFixture tableFixture = new JTableFixture(robot, configurationPanel.table);

        String endpoint = "http://sljll.com";
        restService.addEndpoint(endpoint);
        // this call will fail if the new endpoint is not found in the table
        tableFixture.cell(endpoint);
    }
View Full Code Here

    public void editsTheValueCellAfterNameCell() throws Exception {
        setCellEditorForNameAndValueColumns(PARAM);

        invokeAddParamAction();

        JTableFixture jTableFixture = new JTableFixture(robot, paramTable);

        verifyEditingCell(0, 0);

        jTableFixture.cell(row(0).column(0)).stopEditing();

        verifyEditingCell(0, 1);

        jTableFixture.cell(row(0).column(1)).stopEditing();

    }
View Full Code Here

    public void removesThePropertyIfPropertyNameIsEmpty() throws Exception {
        setCellEditorForNameAndValueColumns("");

        invokeAddParamAction();

        JTableFixture jTableFixture = new JTableFixture(robot, paramTable);

        verifyEditingCell(0, 0);

        jTableFixture.cell(row(0).column(0)).stopEditing();

        assertThat(params.getPropertyCount(), is(0));
    }
View Full Code Here

    public void removesThePropertyIfEditingIsCancelledOnNameCell() throws Exception {
        setCellEditorForNameAndValueColumns("");

        invokeAddParamAction();

        JTableFixture jTableFixture = new JTableFixture(robot, paramTable);

        verifyEditingCell(0, 0);

        jTableFixture.cell(row(0).column(0)).cancelEditing();

        assertThat(params.getPropertyCount(), is(0));
    }
View Full Code Here

        assertTrue("Didn't find the " + menuItemLabel + " menu item", doesLabelExist(popupMenu, menuItemLabel));
    }


    private void verifyEmptyTable(JPanelFixture parentPanel) {
        JTableFixture restParamsTable = parentPanel.table(REST_PARAMS_TABLE);
        assertThat(restParamsTable.target.getRowCount(), is(0));
    }
View Full Code Here

        JTableFixture restParamsTable = parentPanel.table(REST_PARAMS_TABLE);
        assertThat(restParamsTable.target.getRowCount(), is(0));
    }

    private void verifyParamValues(JPanelFixture parentPanel, int rowNum, String paramName, String paramValue) {
        JTableFixture paramTableInResourceEditor = parentPanel.table(REST_PARAMS_TABLE);
        assertThat(paramTableInResourceEditor.cell(row(rowNum).column(0)).value(), is(paramName));
        assertThat(paramTableInResourceEditor.cell(row(rowNum).column(1)).value(), is(paramValue));

    }
View Full Code Here

TOP

Related Classes of org.fest.swing.fixture.JTableFixture

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.