use of org.guvnor.ala.ui.client.wizard.pipeline.params.PipelineParamsPagePresenter in project kie-wb-common by kiegroup.
the class NewDeployWizard method newPipelineParamsPage.
protected PipelineParamsPagePresenter newPipelineParamsPage(PipelineParamsForm paramsForm) {
PipelineParamsPagePresenter paramsPage = newPipelineParamsPage();
paramsPage.setPipelineParamsForm(paramsForm);
return paramsPage;
}
use of org.guvnor.ala.ui.client.wizard.pipeline.params.PipelineParamsPagePresenter in project kie-wb-common by kiegroup.
the class NewDeployWizardTest method testOnStatusChangePipelinePageSelectedWithParamForms.
@Test
public void testOnStatusChangePipelinePageSelectedWithParamForms() {
when(selectPipelinePage.getPipeline()).thenReturn(PIPELINE1_KEY);
when(descriptor1.accept(PIPELINE1_KEY)).thenReturn(true);
when(descriptor2.accept(PIPELINE1_KEY)).thenReturn(false);
when(descriptor1.getParamForms()).thenReturn(paramsForms);
wizard.onStatusChange(new WizardPageStatusChangeEvent(selectPipelinePage));
verify(descriptor1, times(1)).accept(PIPELINE1_KEY);
int totalPages = 1 + paramsForms.size();
assertEquals(totalPages, wizard.getPages().size());
paramsForms.forEach(paramsForm -> {
verify(paramsForm, times(1)).clear();
verify(paramsForm, times(1)).initialise();
});
verify(pipelineParamsPageInstance, times(paramsForms.size())).get();
assertEquals(paramsForms.size(), paramsPages.size());
for (int i = 0; i < paramsForms.size(); i++) {
PipelineParamsPagePresenter pagePresenter = paramsPages.get(i);
verify(pagePresenter, times(1)).setPipelineParamsForm(paramsForms.get(i));
}
}
Aggregations