@Test public void goToChangeRequestReviewScreenTest() { final long changeRequestId = 1L; final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.CHANGE_REQUEST_REVIEW); placeRequest.addParameter(ChangeRequestUtils.CHANGE_REQUEST_ID_KEY, String.valueOf(changeRequestId)); final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest); final LibraryPerspective libraryPerspective = mock(LibraryPerspective.class); libraryPlaces.goToChangeRequestReviewScreen(changeRequestId); verify(placeManager).goTo(part, libraryPerspective.getRootPanel()); verify(libraryBreadcrumbs).setupForChangeRequestReview(activeProject, changeRequestId); }
public void goToChangeRequestReviewScreen(final long changeRequestId) { this.closeChangeRequestReviewScreen(); changeRequestReviewScreen = new DefaultPlaceRequest(LibraryPlaces.CHANGE_REQUEST_REVIEW, Collections.singletonMap(ChangeRequestUtils.CHANGE_REQUEST_ID_KEY, String.valueOf(changeRequestId))); final PartDefinitionImpl part = new PartDefinitionImpl(changeRequestReviewScreen); part.setSelectable(false); placeManager.goTo(part, libraryPerspective.getRootPanel()); libraryBreadcrumbs.setupForChangeRequestReview(getActiveWorkspace(), changeRequestId); }
LibraryPlaces implements WorkspaceProjectContextChangeHandler { public void goToChangeRequestReviewScreen(final long changeRequestId) { this.closeChangeRequestReviewScreen(); changeRequestReviewScreen = new DefaultPlaceRequest(LibraryPlaces.CHANGE_REQUEST_REVIEW, Collections.singletonMap(ChangeRequestUtils.CHANGE_REQUEST_ID_KEY, String.valueOf(changeRequestId))); final PartDefinitionImpl part = new PartDefinitionImpl(changeRequestReviewScreen); part.setSelectable(false); placeManager.goTo(part, libraryPerspective.getRootPanel()); libraryBreadcrumbs.setupForChangeRequestReview(getActiveWorkspace(), changeRequestId); } }
LibraryPlaces implements WorkspaceProjectContextChangeHandler { public void goToChangeRequestReviewScreen(final long changeRequestId) { this.closeChangeRequestReviewScreen(); changeRequestReviewScreen = new DefaultPlaceRequest(LibraryPlaces.CHANGE_REQUEST_REVIEW, Collections.singletonMap(ChangeRequestUtils.CHANGE_REQUEST_ID_KEY, String.valueOf(changeRequestId))); final PartDefinitionImpl part = new PartDefinitionImpl(changeRequestReviewScreen); part.setSelectable(false); placeManager.goTo(part, libraryPerspective.getRootPanel()); libraryBreadcrumbs.setupForChangeRequestReview(getActiveWorkspace(), changeRequestId); } LibraryPlaces(); @Inject  LibraryPlaces(final UberfireBreadcrumbs breadcrumbs,
                         final TranslationService ts,
                         final Event<AssetDetailEvent> assetDetailEvent,
                         final Caller<LibraryService> libraryService,
                         final Caller<WorkspaceProjectService> projectService,
                         final Caller<KieModuleService> moduleService,
                         final PlaceManager placeManager,
                         final WorkspaceProjectContext projectContext,
                         final Event<WorkspaceProjectContextChangeEvent> projectContextChangeEvent,
                         final Event<NotificationEvent> notificationEvent,
                         final TranslationUtils translationUtils,
                         final Caller<VFSService> vfsService,
                         final ManagedInstance<ImportRepositoryPopUpPresenter> importRepositoryPopUpPresenters,
                         final @Routed Event<ProjectAssetListUpdated> assetListUpdatedEvent,
                         final CloseUnsavedProjectAssetsPopUpPresenter closeUnsavedProjectAssetsPopUpPresenter,
                         final @Source(Source.Kind.EXTERNAL) Event<ImportProjectsSetupEvent> importProjectsSetupEvent,
                         final LibraryBreadcrumbs libraryBreadcrumbs,
                         final SessionInfo sessionInfo,
                         final Caller<RepositoryService> repositoryService,
                         final Promises promises,
                         final OrganizationalUnitController organizationalUnitController,
                         final Caller<OrganizationalUnitService> organizationalUnitService,
                         final Logger logger,
                         final Cookie cookie); }
LibraryPlaces implements WorkspaceProjectContextChangeHandler { public void goToChangeRequestReviewScreen(final long changeRequestId) { this.closeChangeRequestReviewScreen(); changeRequestReviewScreen = new DefaultPlaceRequest(LibraryPlaces.CHANGE_REQUEST_REVIEW, Collections.singletonMap(ChangeRequestUtils.CHANGE_REQUEST_ID_KEY, String.valueOf(changeRequestId))); final PartDefinitionImpl part = new PartDefinitionImpl(changeRequestReviewScreen); part.setSelectable(false); placeManager.goTo(part, libraryPerspective.getRootPanel()); libraryBreadcrumbs.setupForChangeRequestReview(getActiveWorkspace(), changeRequestId); } LibraryPlaces(); @Inject  LibraryPlaces(final UberfireBreadcrumbs breadcrumbs,
                         final TranslationService ts,
                         final Event<AssetDetailEvent> assetDetailEvent,
                         final Caller<LibraryService> libraryService,
                         final Caller<WorkspaceProjectService> projectService,
                         final Caller<KieModuleService> moduleService,
                         final PlaceManager placeManager,
                         final WorkspaceProjectContext projectContext,
                         final Event<WorkspaceProjectContextChangeEvent> projectContextChangeEvent,
                         final Event<NotificationEvent> notificationEvent,
                         final TranslationUtils translationUtils,
                         final Caller<VFSService> vfsService,
                         final ManagedInstance<ImportRepositoryPopUpPresenter> importRepositoryPopUpPresenters,
                         final @Routed Event<ProjectAssetListUpdated> assetListUpdatedEvent,
                         final CloseUnsavedProjectAssetsPopUpPresenter closeUnsavedProjectAssetsPopUpPresenter,
                         final @Source(Source.Kind.EXTERNAL) Event<ImportProjectsSetupEvent> importProjectsSetupEvent,
                         final LibraryBreadcrumbs libraryBreadcrumbs,
                         final SessionInfo sessionInfo,
                         final Caller<RepositoryService> repositoryService,
                         final Promises promises,
                         final OrganizationalUnitController organizationalUnitController,
                         final Caller<OrganizationalUnitService> organizationalUnitService,
                         final Logger logger,
                         final Cookie cookie); @PostConstruct void setup(); static Object nativeGoToSpace(final String spaceName); native void expose(); static boolean nativeUserCanCreateOrganizationalUnit(); boolean userCanCreateOrganizationalUnit(); void onSelectPlaceEvent(@Observes final PlaceGainFocusEvent placeGainFocusEvent); void onAssetListUpdateEvent(@Observes @Remote final ProjectAssetListUpdated event); void onNewResourceCreated(@Observes final NewResourceSuccessEvent newResourceSuccessEvent); void onAssetRenamedAccepted(@Observes final ConcurrentRenameAcceptedEvent concurrentRenameAcceptedEvent); void onProjectDeleted(@Observes final RepositoryRemovedEvent repositoryRemovedEvent); void deleteProject(final WorkspaceProject project,
                              final HasBusyIndicator view); void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent); void onAssetSelected(@Observes final AssetDetailEvent assetDetails); void onPreferencesSave(@Observes PreferencesCentralSaveEvent event); void onPreferencesCancel(@Observes PreferencesCentralUndoChangesEvent event); void refresh(final Command callback); void goToOrganizationalUnits(); Promise<Void> goToLibrary(); void goToProject(final WorkspaceProject project); void goToProject(final WorkspaceProject project,
                            final Branch branch); void goToProject(final String spaceName, final String projectName, final String branchName); void goToAsset(final Path path); void goToAddAsset(); void goToSubmitChangeRequestScreen(); void goToChangeRequestReviewScreen(final long changeRequestId); void goToTrySamples(); void goToImportRepositoryPopUp(); void goToExternalImportPresenter(final Set<ImportProject> projects); void setupExternalImportBreadCrumbs(); void closeAllPlacesOrNothing(final Command successCallback); void closeChangeRequestReviewScreen(); void closePlace(final Command successCallback,
                           final PlaceRequest place); WorkspaceProjectContext getWorkbenchContext(); WorkspaceProject getActiveWorkspace(); OrganizationalUnit getActiveSpace(); boolean isThisUserAccessingThisRepository(final String userIdentifier,
                                                     final Repository repository); boolean isThisRepositoryBeingAccessed(final Repository repository); void init(final LibraryPerspective libraryPerspective); @Override void onChange(WorkspaceProjectContextChangeEvent previous,
                         WorkspaceProjectContextChangeEvent current); void onDeletedResource(@Observes final ResourceDeletedEvent deleteFileEvent); void onConcurrentDelete(@Observes final ConcurrentDeleteAcceptedEvent concurrentDeleteAcceptedEvent); }
LibraryPlaces implements WorkspaceProjectContextChangeHandler { public void goToChangeRequestReviewScreen(final long changeRequestId) { this.closeChangeRequestReviewScreen(); changeRequestReviewScreen = new DefaultPlaceRequest(LibraryPlaces.CHANGE_REQUEST_REVIEW, Collections.singletonMap(ChangeRequestUtils.CHANGE_REQUEST_ID_KEY, String.valueOf(changeRequestId))); final PartDefinitionImpl part = new PartDefinitionImpl(changeRequestReviewScreen); part.setSelectable(false); placeManager.goTo(part, libraryPerspective.getRootPanel()); libraryBreadcrumbs.setupForChangeRequestReview(getActiveWorkspace(), changeRequestId); } LibraryPlaces(); @Inject  LibraryPlaces(final UberfireBreadcrumbs breadcrumbs,
                         final TranslationService ts,
                         final Event<AssetDetailEvent> assetDetailEvent,
                         final Caller<LibraryService> libraryService,
                         final Caller<WorkspaceProjectService> projectService,
                         final Caller<KieModuleService> moduleService,
                         final PlaceManager placeManager,
                         final WorkspaceProjectContext projectContext,
                         final Event<WorkspaceProjectContextChangeEvent> projectContextChangeEvent,
                         final Event<NotificationEvent> notificationEvent,
                         final TranslationUtils translationUtils,
                         final Caller<VFSService> vfsService,
                         final ManagedInstance<ImportRepositoryPopUpPresenter> importRepositoryPopUpPresenters,
                         final @Routed Event<ProjectAssetListUpdated> assetListUpdatedEvent,
                         final CloseUnsavedProjectAssetsPopUpPresenter closeUnsavedProjectAssetsPopUpPresenter,
                         final @Source(Source.Kind.EXTERNAL) Event<ImportProjectsSetupEvent> importProjectsSetupEvent,
                         final LibraryBreadcrumbs libraryBreadcrumbs,
                         final SessionInfo sessionInfo,
                         final Caller<RepositoryService> repositoryService,
                         final Promises promises,
                         final OrganizationalUnitController organizationalUnitController,
                         final Caller<OrganizationalUnitService> organizationalUnitService,
                         final Logger logger,
                         final Cookie cookie); @PostConstruct void setup(); static Object nativeGoToSpace(final String spaceName); native void expose(); static boolean nativeUserCanCreateOrganizationalUnit(); boolean userCanCreateOrganizationalUnit(); void onSelectPlaceEvent(@Observes final PlaceGainFocusEvent placeGainFocusEvent); void onAssetListUpdateEvent(@Observes @Remote final ProjectAssetListUpdated event); void onNewResourceCreated(@Observes final NewResourceSuccessEvent newResourceSuccessEvent); void onAssetRenamedAccepted(@Observes final ConcurrentRenameAcceptedEvent concurrentRenameAcceptedEvent); void onProjectDeleted(@Observes final RepositoryRemovedEvent repositoryRemovedEvent); void deleteProject(final WorkspaceProject project,
                              final HasBusyIndicator view); void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent); void onAssetSelected(@Observes final AssetDetailEvent assetDetails); void onPreferencesSave(@Observes PreferencesCentralSaveEvent event); void onPreferencesCancel(@Observes PreferencesCentralUndoChangesEvent event); void refresh(final Command callback); void goToOrganizationalUnits(); Promise<Void> goToLibrary(); void goToProject(final WorkspaceProject project); void goToProject(final WorkspaceProject project,
                            final Branch branch); void goToProject(final String spaceName, final String projectName, final String branchName); void goToAsset(final Path path); void goToAddAsset(); void goToSubmitChangeRequestScreen(); void goToChangeRequestReviewScreen(final long changeRequestId); void goToTrySamples(); void goToImportRepositoryPopUp(); void goToExternalImportPresenter(final Set<ImportProject> projects); void setupExternalImportBreadCrumbs(); void closeAllPlacesOrNothing(final Command successCallback); void closeChangeRequestReviewScreen(); void closePlace(final Command successCallback,
                           final PlaceRequest place); WorkspaceProjectContext getWorkbenchContext(); WorkspaceProject getActiveWorkspace(); OrganizationalUnit getActiveSpace(); boolean isThisUserAccessingThisRepository(final String userIdentifier,
                                                     final Repository repository); boolean isThisRepositoryBeingAccessed(final Repository repository); void init(final LibraryPerspective libraryPerspective); @Override void onChange(WorkspaceProjectContextChangeEvent previous,
                         WorkspaceProjectContextChangeEvent current); void onDeletedResource(@Observes final ResourceDeletedEvent deleteFileEvent); void onConcurrentDelete(@Observes final ConcurrentDeleteAcceptedEvent concurrentDeleteAcceptedEvent); static final String LIBRARY_PERSPECTIVE; static final String LIBRARY_SCREEN; static final String PROJECT_SCREEN; static final String IMPORT_PROJECTS_SCREEN; static final String IMPORT_SAMPLE_PROJECTS_SCREEN; static final String PROJECT_DETAIL_SCREEN; static final String ORG_UNITS_METRICS_SCREEN; static final String PROJECT_METRICS_SCREEN; static final String ORGANIZATIONAL_UNITS_SCREEN; static final String PROJECT_SETTINGS; static final String PROJECT_EXPLORER; static final String ALERTS; static final String REPOSITORY_STRUCTURE_SCREEN; static final String ADD_ASSET_SCREEN; static final String SUBMIT_CHANGE_REQUEST; static final String CHANGE_REQUEST_REVIEW; static final List<String> LIBRARY_PLACES; }