use of org.guvnor.ala.ui.client.events.RefreshRuntimeEvent in project kie-wb-common by kiegroup.
the class NewDeployWizardTest method testStartDeploymentSuccess.
@Test
public void testStartDeploymentSuccess() {
// initialize and start the wizard.
wizard.start(provider, pipelines);
verifyStart();
// e.g. PIPELINE1 was selected.
preSelectForms(PIPELINE1_KEY);
// emulate the user completing the wizard.
preCompleteWizard(PIPELINE1_KEY, RUNTIME);
// emulates the user pressing the finish button
wizard.complete();
// the parameters must the the values collected by the forms.
Map<String, String> expectedPrams = buildExpectedParams(paramsFormsValues);
expectedPrams.put(RUNTIME_NAME, RUNTIME);
verify(runtimeService, times(1)).createRuntime(provider.getKey(), RUNTIME, PIPELINE1_KEY, expectedPrams);
verify(notification, times(1)).fire(new NotificationEvent(SUCCESS_MESSAGE, NotificationEvent.NotificationType.SUCCESS));
verify(refreshRuntimeEvent, times(1)).fire(new RefreshRuntimeEvent(provider.getKey()));
}
use of org.guvnor.ala.ui.client.events.RefreshRuntimeEvent in project kie-wb-common by kiegroup.
the class NewDeployWizard method onPipelineStartSuccess.
private void onPipelineStartSuccess() {
notification.fire(new NotificationEvent(translationService.getTranslation(NewDeployWizard_PipelineStartSuccessMessage), NotificationEvent.NotificationType.SUCCESS));
NewDeployWizard.super.complete();
refreshRuntimeEvent.fire(new RefreshRuntimeEvent(provider.getKey()));
}
use of org.guvnor.ala.ui.client.events.RefreshRuntimeEvent in project kie-wb-common by kiegroup.
the class ProviderPresenterTest method testOnRefreshRuntimesWithItems.
@Test
public void testOnRefreshRuntimesWithItems() {
// emulate that the provider was already loaded.
prepareRefreshWithItems();
// emulate the refresh action in a later time.
presenter.onRefreshRuntime(new RefreshRuntimeEvent(providerKey));
// the ui must have been loaded with the items twice, the initial loading + the refresh
verify(providerStatusPresenter, times(2)).setupItems(runtimeItems);
verify(view, times(2)).setStatus(providerStatusPresenterView);
// common verifications.
verifyRuntimesInfoLoaded(2);
}
use of org.guvnor.ala.ui.client.events.RefreshRuntimeEvent in project kie-wb-common by kiegroup.
the class ProviderPresenterTest method testOnRefreshRuntimesWithNoItems.
@Test
public void testOnRefreshRuntimesWithNoItems() {
// emulate that the provider was already loaded.
prepareRefreshWithNoItems();
// emulate the refresh action in a later time.
presenter.onRefreshRuntime(new RefreshRuntimeEvent(providerKey));
// the ui must have been loaded with the items twice, the initial loading + the refresh
// the empty status must have been set twice.
verifyUILoadedWithNoItems(2);
// common verifications.
verifyRuntimesInfoLoaded(2);
}
use of org.guvnor.ala.ui.client.events.RefreshRuntimeEvent in project kie-wb-common by kiegroup.
the class ProviderStatusEmptyPresenterTest method testOnRefresh.
@Test
public void testOnRefresh() {
presenter.onRefresh();
verify(refreshRuntimeEvent, times(1)).fire(new RefreshRuntimeEvent(providerKey));
}
Aggregations