Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.JTableFixture


  @Test
  public void testSetApplied() {
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPACKAGEGULVSPON.getTableName());

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

    dialogFixture.button("ButtonApply").requireEnabled();
    dialogFixture.button("ButtonUnapply").requireDisabled();

    dialogFixture.button("ButtonApply").click();

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

    dialogFixture.button("ButtonApply").requireDisabled();
    dialogFixture.button("ButtonUnapply").requireEnabled();
  }
View Full Code Here


    dialogFixture.button("ButtonNotStart").requireDisabled();
    dialogFixture.button("ButtonNotStart").requireText(
        "Ikke startet pakking");

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPACKAGEGULVSPON.getTableName());

    assertEquals("Startet", tableFixture.target.getColumnName(6));

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

    String content = tableFixture.cell(row(0).column(5)).value();

    if (content.equalsIgnoreCase("---")) {
      dialogFixture.button("ButtonStart").requireEnabled();
      dialogFixture.button("ButtonStart").click();

      tableFixture.cell(row(0).column(1)).click();
      dialogFixture.button("ButtonStart").requireDisabled();
      dialogFixture.button("ButtonNotStart").requireEnabled();

    } else {
      dialogFixture.button("ButtonNotStart").requireEnabled();
      dialogFixture.button("ButtonNotStart").click();
      dialogFixture.button("ButtonNotStart").requireDisabled();

      tableFixture.cell(row(0).column(1)).click();
      dialogFixture.button("ButtonNotStart").requireDisabled();
      dialogFixture.button("ButtonStart").requireEnabled();
    }
  }
View Full Code Here

  public void testSetApplied() {
    dialogFixture.comboBox("ComboBoxProductAreaGroup")
        .selectItem("Takstol");
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

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

    Produceable order = takstolProductionViewHandler.getSelectedObject();
    int index = 0;
    while (order.getProbability() != 100 || order.getProduced() != null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      order = takstolProductionViewHandler.getSelectedObject();
    }

    dialogFixture.button("ButtonApply").requireEnabled();
    dialogFixture.button("ButtonUnapply").requireDisabled();

    dialogFixture.button("ButtonApply").click();

    DialogFixture productionUnitDialog = WindowFinder.findDialog(
        "Velg produksjonsenhet").using(dialogFixture.robot);
    productionUnitDialog.comboBox().selectItem("Jig 1");
    productionUnitDialog.button("ButtonOk").click();

    DialogFixture articleView = WindowFinder.findDialog(
        "ArticlePackageView").withTimeout(30000).using(
        dialogFixture.robot);
    articleView.button("ButtonOk").click();

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

    dialogFixture.button("ButtonApply").requireDisabled();
    dialogFixture.button("ButtonUnapply").requireEnabled();
  }
View Full Code Here

    dialogFixture.button("ButtonNotStart").requireDisabled();
    dialogFixture.button("ButtonNotStart").requireText(
        "Ikke startet produksjon");

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    assertEquals("Startet", tableFixture.target.getColumnName(8));

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

    Produceable order = takstolProductionViewHandler.getSelectedObject();
    int index = 0;
    while (order.getProbability() != 100 || order.getProduced() != null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      order = takstolProductionViewHandler.getSelectedObject();
    }

    String content = tableFixture.cell(row(index).column(8)).value();

    if (content.equalsIgnoreCase("---")) {
      dialogFixture.button("ButtonStart").requireEnabled();
      dialogFixture.button("ButtonStart").click();
      dialogFixture.button("ButtonStart").requireDisabled();

      tableFixture.cell(row(index).column(1)).click();
      dialogFixture.button("ButtonStart").requireDisabled();
      dialogFixture.button("ButtonNotStart").requireEnabled();

    } else {
      dialogFixture.button("ButtonNotStart").requireEnabled();
      dialogFixture.button("ButtonNotStart").click();
      dialogFixture.button("ButtonNotStart").requireDisabled();

      tableFixture.cell(row(index).column(1)).click();
      dialogFixture.button("ButtonNotStart").requireDisabled();
      dialogFixture.button("ButtonStart").requireEnabled();
    }
  }
View Full Code Here

  }

  @Test
  public void testShowProductionDate() {
    dialogFixture.show(new Dimension(1000, 500));
    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    assertEquals("Prod.dato", tableFixture.target.getColumnName(2));

  }
View Full Code Here

  public void skalSetteStartetKapping() {
    dialogFixture.comboBox("ComboBoxProductAreaGroup")
        .selectItem("Takstol");
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

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

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingStarted() != null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonStartetKapping").requireEnabled();
    dialogFixture.button("ButtonStartetKapping").click();
    tableFixture.cell(row(index-1).column(1)).click();
    assertEquals(ColorEnum.BLUE.getColor(),tableFixture.cell(row(index).column(1)).foreground().target());

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
    orderManager.lazyLoadTree(order);
View Full Code Here

  public void skalIkkeKunneSetteStartetKappingDersomStartetProduksjon() {
    dialogFixture.comboBox("ComboBoxProductAreaGroup")
        .selectItem("Takstol");
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

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

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    boolean funnetStartetProduksjon = false;
    while (!funnetStartetProduksjon) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
      if (takstol.getActionStarted() != null
          && takstol.getProduced() == null) {
        funnetStartetProduksjon = true;
View Full Code Here

  public void skalSettIkkeStartetKapping() {
    dialogFixture.comboBox("ComboBoxProductAreaGroup")
        .selectItem("Takstol");
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

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

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingStarted() == null||takstol.getCuttingDone()!=null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonStartetKapping").requireDisabled();
    dialogFixture.button("ButtonIkkeStartetKapping").requireEnabled();
    dialogFixture.button("ButtonIkkeStartetKapping").click();
    tableFixture.cell(row(index).column(1)).foreground().requireEqualTo(
        new Color(3,3,3));

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
View Full Code Here

  public void skalSetteFerdigKapping() {
    dialogFixture.comboBox("ComboBoxProductAreaGroup")
        .selectItem("Takstol");
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

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

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingDone() != null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonFerdigKappet").requireEnabled();
    dialogFixture.button("ButtonFerdigKappet").click();
    tableFixture.cell(row(index-1).column(1)).click();
    assertEquals(ColorEnum.GREEN.getColor(),tableFixture.cell(row(index).column(1)).foreground().target());

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
    orderManager.lazyLoadTree(order);
View Full Code Here

  public void skalSettIkkeferdigKapping() {
    dialogFixture.comboBox("ComboBoxProductAreaGroup")
        .selectItem("Takstol");
    dialogFixture.checkBox("CheckBoxFilter").uncheck();

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

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

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingDone() == null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonFerdigKappet").requireDisabled();
    dialogFixture.button("ButtonIkkeFerdigKappet").requireEnabled();
    dialogFixture.button("ButtonIkkeFerdigKappet").click();
    tableFixture.cell(row(index).column(1)).foreground().requireEqualTo(
        new Color(3,3,3));

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
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.