currentRowOrder++;
}
missingDialog.button("ButtonCancel").click();
}
Transportable transportable = ((TransportOrderTableModel) dialogFixture
.table(TableEnum.TABLETRANSPORTORDERS.getTableName() + "1").target
.getModel()).getTransportable(currentRowOrder);
dialogFixture
.table(TableEnum.TABLETRANSPORTORDERS.getTableName() + "1")
.cell(row(currentRowOrder).column(1)).select();
dialogFixture
.table(TableEnum.TABLETRANSPORTORDERS.getTableName() + "1")
.cell(row(currentRowOrder).column(1)).rightClick();
JPopupMenuFixture popupMenuFixture = new JPopupMenuFixture(
dialogFixture.robot, (JPopupMenu) dialogFixture.robot.finder()
.findByName("PopupMenuTransport"));
popupMenuFixture.menuItem("MenuItemSetSent").click();
JOptionPaneFixture jOptionPaneFixture = new JOptionPaneFixture(
dialogFixture.robot, dialogFixture.robot.finder().findByType(
JOptionPane.class));
jOptionPaneFixture.buttonWithText("Ja").click();
jOptionPaneFixture = new JOptionPaneFixture(dialogFixture.robot,
dialogFixture.robot.finder().findByType(JOptionPane.class));
jOptionPaneFixture.buttonWithText("Ja").click();
DialogFixture dateDialog = WindowFinder.findDialog("DateView").using(
dialogFixture.robot);
dateDialog.button("ButtonOk").click();
DialogFixture sentDialog = WindowFinder.findDialog("SentTransportView")
.using(dialogFixture.robot);
sentDialog.button("ButtonOk").click();
jOptionPaneFixture = new JOptionPaneFixture(dialogFixture.robot,
dialogFixture.robot.finder().findByType(JOptionPane.class));
jOptionPaneFixture.buttonWithText("Ja").click();
DialogFixture deviationDialog = WindowFinder.findDialog(
"EditDeviationView").using(dialogFixture.robot);
deviationDialog.radioButton("RadioButtonInternal").click();
deviationDialog.comboBox("ComboBoxResponsible").selectItem(1);
deviationDialog.comboBox("ComboBoxDeviationFunction").selectItem(1);
deviationDialog.comboBox("ComboBoxFunctionCategory").selectItem(1);
deviationDialog.comboBox("ComboBoxStatus").selectItem(1);
deviationDialog.button("AddDeviationComment").click();
JDialog commentDialog = (JDialog) dialogFixture.robot.finder()
.findByName("EditCommentView");
DialogFixture commentDialogFixture = new DialogFixture(
dialogFixture.robot, commentDialog);
commentDialogFixture.textBox("TextAreaComment").enterText("test");
commentDialogFixture.button("ButtonCommentOk").click();
deviationDialog.button("ButtonOk").click();
//
PostShipment postShipment = null;
boolean postShipmentNotFound = true;
int currentRowPostShipment = 0;
while (postShipmentNotFound) {
postShipment = ((PostShipmentTableModel) dialogFixture
.table("TablePostShipments").target.getModel())
.getPostShipment(currentRowPostShipment);
if (postShipment != null
&& postShipment
.getOrder()
.getOrderNr()
.equalsIgnoreCase(
transportable.getOrder().getOrderNr())) {
postShipmentNotFound = false;
} else {
currentRowPostShipment++;
}
}