Search in sources :

Example 16 with RuntimeListItem

use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.

the class RuntimePresenterActionsSetupTest method prepareRuntimeActionsSetupTest.

private void prepareRuntimeActionsSetupTest(final String status) {
    runtime = mockRuntime();
    runtime.setStatus(status);
    item = new RuntimeListItem(RUNTIME_NAME, runtime);
    presenter.setup(item);
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem)

Example 17 with RuntimeListItem

use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.

the class RuntimePresenterActionsTest method prepareRuntime.

private void prepareRuntime() {
    runtime = mockRuntime();
    item = new RuntimeListItem(RUNTIME_NAME, runtime);
    presenter.setup(item);
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem)

Example 18 with RuntimeListItem

use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.

the class RuntimePresenterActionsTest method testOnCurrentPipelineExecutionStopped.

@Test
public void testOnCurrentPipelineExecutionStopped() {
    preparePipelineExecutionTraceSetup();
    PipelineExecutionTraceKey currentKey = trace.getKey();
    RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace);
    presenter.setup(item);
    presenter.onPipelineExecutionChange(new PipelineExecutionChangeEvent(PipelineExecutionChange.STOPPED, currentKey));
    verify(presenter, times(1)).refresh(currentKey);
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem) PipelineExecutionChangeEvent(org.guvnor.ala.ui.events.PipelineExecutionChangeEvent) PipelineExecutionTraceKey(org.guvnor.ala.ui.model.PipelineExecutionTraceKey) Test(org.junit.Test)

Example 19 with RuntimeListItem

use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.

the class RuntimePresenterActionsTest method testShowPipelineExecutionError.

@Test
public void testShowPipelineExecutionError() {
    trace = mockPipelineExecutionTrace(EXECUTION_ID, mockPipeline(PIPELINE_NAME, STAGE_NUMBER), mock(PipelineStatus.class), mock(PipelineStatus.class));
    trace.setPipelineStatus(PipelineStatus.ERROR);
    trace.setPipelineError(new PipelineError(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL));
    item = new RuntimeListItem(RUNTIME_NAME, trace);
    presenter.setup(item);
    presenter.showPipelineError();
    verify(popupHelper, times(1)).showErrorPopup(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL);
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem) PipelineError(org.guvnor.ala.ui.model.PipelineError) Test(org.junit.Test)

Example 20 with RuntimeListItem

use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.

the class RuntimePresenterActionsTest method testOnOtherPipelineExecutionStopped.

@Test
public void testOnOtherPipelineExecutionStopped() {
    preparePipelineExecutionTraceSetup();
    PipelineExecutionTraceKey otherKey = mock(PipelineExecutionTraceKey.class);
    RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace);
    presenter.setup(item);
    presenter.onPipelineExecutionChange(new PipelineExecutionChangeEvent(PipelineExecutionChange.STOPPED, otherKey));
    verify(presenter, never()).refresh(any(PipelineExecutionTraceKey.class));
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem) PipelineExecutionChangeEvent(org.guvnor.ala.ui.events.PipelineExecutionChangeEvent) PipelineExecutionTraceKey(org.guvnor.ala.ui.model.PipelineExecutionTraceKey) Test(org.junit.Test)

Aggregations

RuntimeListItem (org.guvnor.ala.ui.model.RuntimeListItem)29 Test (org.junit.Test)23 PipelineExecutionTraceKey (org.guvnor.ala.ui.model.PipelineExecutionTraceKey)7 RuntimeQuery (org.guvnor.ala.services.api.RuntimeQuery)5 RuntimeKey (org.guvnor.ala.ui.model.RuntimeKey)5 RuntimeQueryResultItem (org.guvnor.ala.services.api.RuntimeQueryResultItem)4 ProviderKey (org.guvnor.ala.ui.model.ProviderKey)4 Stage (org.guvnor.ala.ui.model.Stage)3 ArrayList (java.util.ArrayList)2 StagePresenter (org.guvnor.ala.ui.client.widget.pipeline.stage.StagePresenter)2 PipelineExecutionChangeEvent (org.guvnor.ala.ui.events.PipelineExecutionChangeEvent)2 StageStatusChangeEvent (org.guvnor.ala.ui.events.StageStatusChangeEvent)2 PipelineError (org.guvnor.ala.ui.model.PipelineError)2 PipelineExecutionTrace (org.guvnor.ala.ui.model.PipelineExecutionTrace)2 ProviderTypeKey (org.guvnor.ala.ui.model.ProviderTypeKey)2 Runtime (org.guvnor.ala.ui.model.Runtime)2 PipelineStatusChangeEvent (org.guvnor.ala.ui.events.PipelineStatusChangeEvent)1 Pipeline (org.guvnor.ala.ui.model.Pipeline)1 PipelineKey (org.guvnor.ala.ui.model.PipelineKey)1 Provider (org.guvnor.ala.ui.model.Provider)1