ProcessInstanceLogItemView extends AbstractLogItemView<ProcessInstanceLogPresenter> implements TakesValue<ProcessInstanceLogSummary>,
                   IsElement { @Override public void setValue(final ProcessInstanceLogSummary model) { logSummary.setModel(model); setLogTime(model.getDate()); setLogIcon(model); setLogInfo(model); setLogType(model); setDetails(model); }  @Override ProcessInstanceLogSummary getValue(); @Override void setValue(final ProcessInstanceLogSummary model); @EventHandler("detailsLink") void loadProcessInstanceLogsDetails(final @ForEvent("click") MouseEvent event);  }
@Test public void testCompletedHumanTask() { ProcessInstanceLogSummary model = createModel("HumanTaskNode", "userTask", true, true); view.setValue(model); verify(logIcon).setAttribute("data-original-title", "Human task"); verify(logIcon).setClassName("list-view-pf-icon-sm kie-timeline-list-view-pf-icon-sm fa fa-user kie-timeline-icon--completed"); verify(logInfo).setTextContent("(Human) node was COMPLETED"); verify(logTypeDesc).setTextContent("Task 'userTask'"); verify(detailsPanelDiv).setHidden(false); verifyHumanTaskDetails(model); }
@Test public void testNotCompletedHumanTask() { ProcessInstanceLogSummary model = createModel("HumanTaskNode", "userTask", false, true); view.setValue(model); verify(logIcon).setAttribute("data-original-title", "Human task"); verify(logIcon).setClassName("list-view-pf-icon-sm kie-timeline-list-view-pf-icon-sm fa fa-user"); verify(logInfo).setTextContent("(Human) node was ENTERED"); verify(logTypeDesc).setTextContent("Task 'userTask'"); verify(detailsPanelDiv).setHidden(false); verifyHumanTaskDetails(model); }
@Test public void testCompletedWorkItemNode() { ProcessInstanceLogSummary model = createModel("WorkItemNode", "workItemTask", true, true); view.setValue(model); verify(logIcon).setAttribute("data-original-title", "System task"); verify(logIcon).setClassName("list-view-pf-icon-sm kie-timeline-list-view-pf-icon-sm fa fa-cogs kie-timeline-icon--completed"); verify(logInfo).setTextContent("(System) node was COMPLETED"); verify(logTypeDesc).setTextContent("WorkItemNode 'workItemTask' "); verify(detailsPanelDiv).setHidden(false); verifySystemTaskDetails(model); }
@Test public void testNotCompletedWorkItemNode() { ProcessInstanceLogSummary model = createModel("WorkItemNode", "workItemTask", false, true); view.setValue(model); verify(logIcon).setAttribute("data-original-title", "System task"); verify(logIcon).setClassName("list-view-pf-icon-sm kie-timeline-list-view-pf-icon-sm fa fa-cogs"); verify(logInfo).setTextContent("(System) node was ENTERED"); verify(logTypeDesc).setTextContent("WorkItemNode 'workItemTask' "); verify(detailsPanelDiv).setHidden(false); verifySystemTaskDetails(model); }
@Test public void testCompletedStartNode() { ProcessInstanceLogSummary model = createModel("StartNode", "startNode", true, false); view.setValue(model); verify(logIcon).setAttribute("data-original-title", "System task"); verify(logIcon).setClassName("list-view-pf-icon-sm kie-timeline-list-view-pf-icon-sm fa fa-cogs kie-timeline-icon--completed"); verify(logInfo).setTextContent("(System) node was COMPLETED"); verify(logTypeDesc).setTextContent("StartNode 'startNode' "); verify(detailsPanelDiv).setHidden(true); verifyNoDetails(model); }
@Test public void testNotCompletedStartNode() { ProcessInstanceLogSummary model = createModel("StartNode", "startNode", false, false); view.setValue(model); verify(logIcon).setAttribute("data-original-title", "Human task"); verify(logIcon).setClassName("list-view-pf-icon-sm kie-timeline-list-view-pf-icon-sm fa fa-user"); verify(logInfo).setTextContent("(Human) node was ENTERED"); verify(logTypeDesc).setTextContent("StartNode 'startNode' "); verify(detailsPanelDiv).setHidden(true); verifyNoDetails(model); }