Search in sources :

Example 1 with PipelineParamsPagePresenter

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;
}
Also used : PipelineParamsPagePresenter(org.guvnor.ala.ui.client.wizard.pipeline.params.PipelineParamsPagePresenter)

Example 2 with PipelineParamsPagePresenter

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));
    }
}
Also used : PipelineParamsPagePresenter(org.guvnor.ala.ui.client.wizard.pipeline.params.PipelineParamsPagePresenter) WizardPageStatusChangeEvent(org.uberfire.ext.widgets.core.client.wizards.WizardPageStatusChangeEvent) Test(org.junit.Test)

Aggregations

PipelineParamsPagePresenter (org.guvnor.ala.ui.client.wizard.pipeline.params.PipelineParamsPagePresenter)2 Test (org.junit.Test)1 WizardPageStatusChangeEvent (org.uberfire.ext.widgets.core.client.wizards.WizardPageStatusChangeEvent)1