mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
changed travis/docker setup
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,9 +7,6 @@ npm-debug.log
|
||||
|
||||
/build/
|
||||
|
||||
/src/environments/environment.dev.ts
|
||||
/src/environments/environment.prod.ts
|
||||
|
||||
/coverage
|
||||
|
||||
/dist/
|
||||
|
@@ -4,9 +4,9 @@
|
||||
FROM node:12-alpine
|
||||
WORKDIR /app
|
||||
ADD . /app/
|
||||
EXPOSE 3000
|
||||
EXPOSE 4200
|
||||
|
||||
# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
|
||||
# See, for example https://github.com/yarnpkg/yarn/issues/5540
|
||||
RUN yarn install --network-timeout 300000
|
||||
CMD yarn run watch
|
||||
CMD yarn run start:dev
|
||||
|
12
angular.json
12
angular.json
@@ -144,6 +144,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"e2e:docker": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "dspace-angular-cli:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "dspace-angular-cli:serve:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
"builder": "@angular-builders/custom-webpack:server",
|
||||
"options": {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
"e2e": "ng e2e",
|
||||
"compile:server": "webpack --config webpack.server.config.js --progress --colors",
|
||||
"serve:ssr": "node dist/server",
|
||||
"ci": "ng lint && yarn run build:prod && yarn test:headless && ng e2e",
|
||||
"ci": "ng lint && yarn run build:prod && yarn test:headless && ng e2e:docker",
|
||||
"clean:coverage": "rimraf coverage",
|
||||
"clean:dist": "rimraf dist",
|
||||
"clean:doc": "rimraf doc",
|
||||
|
@@ -10,7 +10,7 @@ import { ScrollToService } from '@nicky-lenaers/ngx-scroll-to';
|
||||
import { HALEndpointService } from '../../core/shared/hal-endpoint.service';
|
||||
import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
|
||||
import { AuthService } from '../../core/auth/auth.service';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { createTestComponent } from '../../shared/testing/utils.test';
|
||||
import { MyDSpaceNewSubmissionComponent } from './my-dspace-new-submission.component';
|
||||
import { AppState } from '../../app.reducer';
|
||||
@@ -49,7 +49,7 @@ describe('MyDSpaceNewSubmissionComponent test', () => {
|
||||
],
|
||||
providers: [
|
||||
{ provide: AuthService, useClass: AuthServiceStub },
|
||||
{ provide: HALEndpointService, useValue: new HalEndpointServiceStub('workspaceitems') },
|
||||
{ provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') },
|
||||
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
||||
{ provide: ScrollToService, useValue: getMockScrollToService() },
|
||||
{ provide: Store, useValue: store },
|
||||
|
@@ -3,7 +3,7 @@ import { of as observableOf } from 'rxjs';
|
||||
import { TestScheduler } from 'rxjs/testing';
|
||||
import { getMockRemoteDataBuildService } from '../../shared/mocks/remote-data-build.service.mock';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { BrowseEndpointRequest, BrowseEntriesRequest, BrowseItemsRequest } from '../data/request.models';
|
||||
import { RequestEntry } from '../data/request.reducer';
|
||||
@@ -19,7 +19,7 @@ describe('BrowseService', () => {
|
||||
let rdbService: RemoteDataBuildService;
|
||||
|
||||
const browsesEndpointURL = 'https://rest.api/browses';
|
||||
const halService: any = new HalEndpointServiceStub(browsesEndpointURL);
|
||||
const halService: any = new HALEndpointServiceStub(browsesEndpointURL);
|
||||
const browseDefinitions = [
|
||||
Object.assign(new BrowseDefinition(), {
|
||||
id: 'date',
|
||||
|
13
src/app/core/cache/server-sync-buffer.effects.ts
vendored
13
src/app/core/cache/server-sync-buffer.effects.ts
vendored
@@ -1,23 +1,16 @@
|
||||
import { delay, exhaustMap, map, switchMap, take } from 'rxjs/operators';
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, Effect, ofType } from '@ngrx/effects';
|
||||
import { coreSelector } from '../core.selectors';
|
||||
import { DSpaceSerializer } from '../dspace-rest-v2/dspace.serializer';
|
||||
import {
|
||||
AddToSSBAction,
|
||||
CommitSSBAction,
|
||||
EmptySSBAction,
|
||||
ServerSyncBufferActionTypes
|
||||
} from './server-sync-buffer.actions';
|
||||
import { AddToSSBAction, CommitSSBAction, EmptySSBAction, ServerSyncBufferActionTypes } from './server-sync-buffer.actions';
|
||||
import { CoreState } from '../core.reducers';
|
||||
import { Action, createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
|
||||
import { ServerSyncBufferEntry, ServerSyncBufferState } from './server-sync-buffer.reducer';
|
||||
import { combineLatest as observableCombineLatest, of as observableOf } from 'rxjs';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { PatchRequest, PutRequest } from '../data/request.models';
|
||||
import { PatchRequest } from '../data/request.models';
|
||||
import { ObjectCacheService } from './object-cache.service';
|
||||
import { ApplyPatchObjectCacheAction } from './object-cache.actions';
|
||||
import { GenericConstructor } from '../shared/generic-constructor';
|
||||
import { hasValue, isNotEmpty, isNotUndefined } from '../../shared/empty.util';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { RestRequestMethod } from '../data/rest-request-method';
|
||||
|
@@ -5,7 +5,7 @@ import { ConfigService } from './config.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { ConfigRequest, FindListOptions } from '../data/request.models';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
|
||||
const LINK_NAME = 'test';
|
||||
const BROWSE = 'search/findByCollection';
|
||||
@@ -46,7 +46,7 @@ describe('ConfigService', () => {
|
||||
beforeEach(() => {
|
||||
scheduler = getTestScheduler();
|
||||
requestService = getMockRequestService();
|
||||
halService = new HalEndpointServiceStub(configEndpoint);
|
||||
halService = new HALEndpointServiceStub(configEndpoint);
|
||||
service = initTestService();
|
||||
});
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import { CollectionDataService } from './collection-data.service';
|
||||
import { RequestService } from './request.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
|
||||
import { getMockTranslateService } from '../../shared/mocks/translate.service.mock';
|
||||
import { fakeAsync, tick } from '@angular/core/testing';
|
||||
@@ -122,7 +122,7 @@ describe('CollectionDataService', () => {
|
||||
objectCache = jasmine.createSpyObj('objectCache', {
|
||||
remove: jasmine.createSpy('remove')
|
||||
});
|
||||
halService = new HalEndpointServiceStub(url);
|
||||
halService = new HALEndpointServiceStub(url);
|
||||
notificationsService = new NotificationsServiceStub();
|
||||
translate = getMockTranslateService();
|
||||
|
||||
|
@@ -2,14 +2,12 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { compare, Operation } from 'fast-json-patch';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import * as uuidv4 from 'uuid/v4';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { followLink } from '../../shared/utils/follow-link-config.model';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { SortDirection, SortOptions } from '../cache/models/sort-options.model';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { CoreState } from '../core.reducers';
|
||||
import { Collection } from '../shared/collection.model';
|
||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { Item } from '../shared/item.model';
|
||||
@@ -18,8 +16,8 @@ import { ChangeAnalyzer } from './change-analyzer';
|
||||
import { DataService } from './data.service';
|
||||
import { FindListOptions, PatchRequest } from './request.models';
|
||||
import { RequestService } from './request.service';
|
||||
import { getMockRequestService } from '../../shared/mocks/mock-request.service';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service-stub';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
|
||||
const endpoint = 'https://rest.api/core';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { getMockRemoteDataBuildService } from '../../shared/mocks/remote-data-build.service.mock';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { ItemType } from '../shared/item-relationships/item-type.model';
|
||||
@@ -33,7 +33,7 @@ describe('RelationshipTypeService', () => {
|
||||
|
||||
function init() {
|
||||
restEndpointURL = 'https://rest.api/relationshiptypes';
|
||||
halService = new HalEndpointServiceStub(restEndpointURL);
|
||||
halService = new HALEndpointServiceStub(restEndpointURL);
|
||||
publicationTypeString = 'Publication';
|
||||
personTypeString = 'Person';
|
||||
orgUnitTypeString = 'OrgUnit';
|
||||
|
@@ -3,7 +3,7 @@ import { of as observableOf } from 'rxjs/internal/observable/of';
|
||||
import * as ItemRelationshipsUtils from '../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
import { getMockRemoteDataBuildServiceHrefMap } from '../../shared/mocks/remote-data-build.service.mock';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
||||
import { spyOnOperator } from '../../shared/testing/utils.test';
|
||||
import { followLink } from '../../shared/utils/follow-link-config.model';
|
||||
@@ -25,7 +25,7 @@ describe('RelationshipService', () => {
|
||||
|
||||
const restEndpointURL = 'https://rest.api/core';
|
||||
const relationshipsEndpointURL = `${restEndpointURL}/relationships`;
|
||||
const halService: any = new HalEndpointServiceStub(restEndpointURL);
|
||||
const halService: any = new HALEndpointServiceStub(restEndpointURL);
|
||||
|
||||
const relationshipType = Object.assign(new RelationshipType(), {
|
||||
id: '1',
|
||||
|
@@ -5,7 +5,7 @@ import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { IntegrationRequest } from '../data/request.models';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { IntegrationService } from './integration.service';
|
||||
import { IntegrationSearchOptions } from './models/integration-options.model';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
@@ -60,7 +60,7 @@ describe('IntegrationService', () => {
|
||||
requestService = getMockRequestService();
|
||||
rdbService = getMockRemoteDataBuildService();
|
||||
scheduler = getTestScheduler();
|
||||
halService = new HalEndpointServiceStub(integrationEndpoint);
|
||||
halService = new HALEndpointServiceStub(integrationEndpoint);
|
||||
findOptions = new IntegrationSearchOptions(uuid, name, metadata, query);
|
||||
service = initTestService();
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import { Store, StoreModule } from '@ngrx/store';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { SubmissionPatchRequest } from '../data/request.models';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { getMockRemoteDataBuildService } from '../../shared/mocks/remote-data-build.service.mock';
|
||||
import { JsonPatchOperationsService } from './json-patch-operations.service';
|
||||
@@ -115,7 +115,7 @@ describe('JsonPatchOperationsService test suite', () => {
|
||||
requestService = getMockRequestService(getRequestEntry$(true));
|
||||
rdbService = getMockRemoteDataBuildService();
|
||||
scheduler = getTestScheduler();
|
||||
halService = new HalEndpointServiceStub(resourceEndpointURL);
|
||||
halService = new HALEndpointServiceStub(resourceEndpointURL);
|
||||
service = initTestService();
|
||||
|
||||
spyOn(store, 'select').and.returnValue(observableOf(mockState['json/patch'][testJsonPatchResourceType]));
|
||||
@@ -168,7 +168,7 @@ describe('JsonPatchOperationsService test suite', () => {
|
||||
requestService = getMockRequestService(getRequestEntry$(false));
|
||||
rdbService = getMockRemoteDataBuildService();
|
||||
scheduler = getTestScheduler();
|
||||
halService = new HalEndpointServiceStub(resourceEndpointURL);
|
||||
halService = new HALEndpointServiceStub(resourceEndpointURL);
|
||||
service = initTestService();
|
||||
|
||||
store.select.and.returnValue(observableOf(mockState['json/patch'][testJsonPatchResourceType]));
|
||||
@@ -231,7 +231,7 @@ describe('JsonPatchOperationsService test suite', () => {
|
||||
requestService = getMockRequestService(getRequestEntry$(false));
|
||||
rdbService = getMockRemoteDataBuildService();
|
||||
scheduler = getTestScheduler();
|
||||
halService = new HalEndpointServiceStub(resourceEndpointURL);
|
||||
halService = new HALEndpointServiceStub(resourceEndpointURL);
|
||||
service = initTestService();
|
||||
|
||||
store.select.and.returnValue(observableOf(mockState['json/patch'][testJsonPatchResourceType]));
|
||||
|
@@ -6,7 +6,7 @@ import { RequestService } from '../data/request.service';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { getMockRemoteDataBuildService } from '../../shared/mocks/remote-data-build.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import {
|
||||
SubmissionDeleteRequest,
|
||||
SubmissionPatchRequest,
|
||||
@@ -41,7 +41,7 @@ describe('SubmissionRestService test suite', () => {
|
||||
requestService = getMockRequestService();
|
||||
rdbService = getMockRemoteDataBuildService();
|
||||
scheduler = getTestScheduler();
|
||||
halService = new HalEndpointServiceStub(resourceEndpointURL);
|
||||
halService = new HALEndpointServiceStub(resourceEndpointURL);
|
||||
service = initTestService();
|
||||
|
||||
});
|
||||
|
@@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { CoreState } from '../core.reducers';
|
||||
@@ -16,7 +16,7 @@ describe('ClaimedTaskDataService', () => {
|
||||
const taskEndpoint = 'https://rest.api/task';
|
||||
const linkPath = 'claimedtasks';
|
||||
const requestService: any = getMockRequestService();
|
||||
const halService: any = new HalEndpointServiceStub(taskEndpoint);
|
||||
const halService: any = new HALEndpointServiceStub(taskEndpoint);
|
||||
const rdbService = {} as RemoteDataBuildService;
|
||||
const notificationsService = {} as NotificationsService;
|
||||
const http = {} as HttpClient;
|
||||
|
@@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { CoreState } from '../core.reducers';
|
||||
@@ -16,7 +16,7 @@ describe('PoolTaskDataService', () => {
|
||||
const taskEndpoint = 'https://rest.api/task';
|
||||
const linkPath = 'pooltasks';
|
||||
const requestService = getMockRequestService();
|
||||
const halService: any = new HalEndpointServiceStub(taskEndpoint);
|
||||
const halService: any = new HALEndpointServiceStub(taskEndpoint);
|
||||
const rdbService = {} as RemoteDataBuildService;
|
||||
const notificationsService = {} as NotificationsService;
|
||||
const http = {} as HttpClient;
|
||||
|
@@ -6,7 +6,7 @@ import { TasksService } from './tasks.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { TaskDeleteRequest, TaskPostRequest } from '../data/request.models';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { TaskObject } from './models/task-object.model';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -55,7 +55,7 @@ describe('TasksService', () => {
|
||||
const taskEndpoint = 'https://rest.api/task';
|
||||
const linkPath = 'testTask';
|
||||
const requestService = getMockRequestService();
|
||||
const halService: any = new HalEndpointServiceStub(taskEndpoint);
|
||||
const halService: any = new HALEndpointServiceStub(taskEndpoint);
|
||||
const rdbService = {} as RemoteDataBuildService;
|
||||
const notificationsService = {} as NotificationsService;
|
||||
const http = {} as HttpClient;
|
||||
|
@@ -24,7 +24,7 @@ import { PageInfo } from '../../../../core/shared/page-info.model';
|
||||
import { UUIDService } from '../../../../core/shared/uuid.service';
|
||||
import { TranslateLoaderMock } from '../../../mocks/translate-loader.mock';
|
||||
import { NotificationsService } from '../../../notifications/notifications.service';
|
||||
import { HalEndpointServiceStub } from '../../../testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../../testing/hal-endpoint-service.stub';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../remote-data.utils';
|
||||
import { FileSizePipe } from '../../../utils/file-size-pipe';
|
||||
import { FollowLinkConfig } from '../../../utils/follow-link-config.model';
|
||||
@@ -96,7 +96,7 @@ describe('ItemDetailPreviewComponent', () => {
|
||||
declarations: [ItemDetailPreviewComponent, ItemDetailPreviewFieldComponent, TruncatePipe, FileSizePipe, VarDirective],
|
||||
providers: [
|
||||
{ provide: FileService, useValue: getMockFileService() },
|
||||
{ provide: HALEndpointService, useValue: new HalEndpointServiceStub('workspaceitems') },
|
||||
{ provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') },
|
||||
{ provide: ObjectCacheService, useValue: {} },
|
||||
{ provide: UUIDService, useValue: {} },
|
||||
{ provide: Store, useValue: {} },
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { of as observableOf } from 'rxjs';
|
||||
|
||||
export class HalEndpointServiceStub {
|
||||
export class HALEndpointServiceStub {
|
||||
|
||||
constructor(private url: string) {};
|
||||
getEndpoint(path: string) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { StatisticsService } from './statistics.service';
|
||||
import { RequestService } from '../core/data/request.service';
|
||||
import { HalEndpointServiceStub } from '../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../shared/testing/hal-endpoint-service.stub';
|
||||
import { getMockRequestService } from '../shared/mocks/request.service.mock';
|
||||
import { TrackRequest } from './track-request.model';
|
||||
import { isEqual } from 'lodash';
|
||||
@@ -11,7 +11,7 @@ describe('StatisticsService', () => {
|
||||
let service: StatisticsService;
|
||||
let requestService: jasmine.SpyObj<RequestService>;
|
||||
const restURL = 'https://rest.api';
|
||||
const halService: any = new HalEndpointServiceStub(restURL);
|
||||
const halService: any = new HALEndpointServiceStub(restURL);
|
||||
|
||||
function initTestService() {
|
||||
return new StatisticsService(
|
||||
|
@@ -18,7 +18,7 @@ import { SubmissionFormComponent } from './submission-form.component';
|
||||
import { HALEndpointService } from '../../core/shared/hal-endpoint.service';
|
||||
import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
|
||||
import { AuthService } from '../../core/auth/auth.service';
|
||||
import { HalEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { createTestComponent } from '../../shared/testing/utils.test';
|
||||
|
||||
describe('SubmissionFormComponent Component', () => {
|
||||
@@ -47,7 +47,7 @@ describe('SubmissionFormComponent Component', () => {
|
||||
],
|
||||
providers: [
|
||||
{ provide: AuthService, useClass: AuthServiceStub },
|
||||
{ provide: HALEndpointService, useValue: new HalEndpointServiceStub('workspaceitems') },
|
||||
{ provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') },
|
||||
{ provide: SubmissionService, useClass: SubmissionServiceStub },
|
||||
ChangeDetectorRef,
|
||||
SubmissionFormComponent
|
||||
|
@@ -10,7 +10,7 @@ import { FileService } from '../../../../core/shared/file.service';
|
||||
import { FormService } from '../../../../shared/form/form.service';
|
||||
import { getMockFormService } from '../../../../shared/mocks/form-service.mock';
|
||||
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
|
||||
import { HalEndpointServiceStub } from '../../../../shared/testing/hal-endpoint-service.stub';
|
||||
import { HALEndpointServiceStub } from '../../../../shared/testing/hal-endpoint-service.stub';
|
||||
import { NgbModal, NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { JsonPatchOperationsBuilder } from '../../../../core/json-patch/builder/json-patch-operations-builder';
|
||||
import { SubmissionJsonPatchOperationsServiceStub } from '../../../../shared/testing/submission-json-patch-operations-service.stub';
|
||||
@@ -97,7 +97,7 @@ describe('SubmissionSectionUploadFileComponent test suite', () => {
|
||||
providers: [
|
||||
{ provide: FileService, useValue: getMockFileService() },
|
||||
{ provide: FormService, useValue: getMockFormService() },
|
||||
{ provide: HALEndpointService, useValue: new HalEndpointServiceStub('workspaceitems') },
|
||||
{ provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') },
|
||||
{ provide: JsonPatchOperationsBuilder, useValue: jsonPatchOpBuilder },
|
||||
{ provide: SubmissionJsonPatchOperationsService, useValue: submissionJsonPatchOperationsServiceStub },
|
||||
{ provide: SubmissionService, useClass: SubmissionServiceStub },
|
||||
|
@@ -1559,6 +1559,64 @@
|
||||
|
||||
|
||||
|
||||
"profile.breadcrumbs": "Update Profile",
|
||||
|
||||
"profile.card.identify": "Identify",
|
||||
|
||||
"profile.card.security": "Security",
|
||||
|
||||
"profile.form.submit": "Update Profile",
|
||||
|
||||
"profile.groups.head": "Authorization groups you belong to",
|
||||
|
||||
"profile.head": "Update Profile",
|
||||
|
||||
"profile.metadata.form.error.firstname.required": "First Name is required",
|
||||
|
||||
"profile.metadata.form.error.lastname.required": "Last Name is required",
|
||||
|
||||
"profile.metadata.form.label.email": "Email Address",
|
||||
|
||||
"profile.metadata.form.label.firstname": "First Name",
|
||||
|
||||
"profile.metadata.form.label.language": "Language",
|
||||
|
||||
"profile.metadata.form.label.lastname": "Last Name",
|
||||
|
||||
"profile.metadata.form.label.phone": "Contact Telephone",
|
||||
|
||||
"profile.metadata.form.notifications.success.content": "Your changes to the profile were saved.",
|
||||
|
||||
"profile.metadata.form.notifications.success.title": "Profile saved",
|
||||
|
||||
"profile.notifications.warning.no-changes.content": "No changes were made to the Profile.",
|
||||
|
||||
"profile.notifications.warning.no-changes.title": "No changes",
|
||||
|
||||
"profile.security.form.error.matching-passwords": "The passwords do not match.",
|
||||
|
||||
"profile.security.form.error.password-length": "The password should be at least 6 characters long.",
|
||||
|
||||
"profile.security.form.info": "Optionally, you can enter a new password in the box below, and confirm it by typing it again into the second box. It should be at least six characters long.",
|
||||
|
||||
"profile.security.form.label.password": "Password",
|
||||
|
||||
"profile.security.form.label.passwordrepeat": "Retype to confirm",
|
||||
|
||||
"profile.security.form.notifications.success.content": "Your changes to the password were saved.",
|
||||
|
||||
"profile.security.form.notifications.success.title": "Password saved",
|
||||
|
||||
"profile.security.form.notifications.error.title": "Error changing passwords",
|
||||
|
||||
"profile.security.form.notifications.error.not-long-enough": "The password has to be at least 6 characters long.",
|
||||
|
||||
"profile.security.form.notifications.error.not-same": "The provided passwords are not the same.",
|
||||
|
||||
"profile.title": "Update Profile",
|
||||
|
||||
|
||||
|
||||
"project.listelement.badge": "Research Project",
|
||||
|
||||
"project.page.contributor": "Contributors",
|
||||
|
@@ -10,7 +10,7 @@ export const environment: GlobalConfig = {
|
||||
ui: new ServerConfig(
|
||||
false,
|
||||
'localhost',
|
||||
3000,
|
||||
4000,
|
||||
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
|
||||
'/',
|
||||
),
|
||||
|
6
src/environments/environment.dev.ts
Normal file
6
src/environments/environment.dev.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { environment as defaultEnv } from './environment.common';
|
||||
import { GlobalConfig } from '../config/global-config.interface';
|
||||
|
||||
export const environment: GlobalConfig = {
|
||||
...defaultEnv,
|
||||
};
|
6
src/environments/environment.prod.ts
Normal file
6
src/environments/environment.prod.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { environment as defaultEnv } from './environment.common';
|
||||
import { GlobalConfig } from '../config/global-config.interface';
|
||||
|
||||
export const environment: GlobalConfig = {
|
||||
...defaultEnv,
|
||||
};
|
@@ -68,5 +68,14 @@ export const environment: GlobalConfig = {
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
languages: [{
|
||||
code: 'en',
|
||||
label: 'English',
|
||||
active: true,
|
||||
}, {
|
||||
code: 'de',
|
||||
label: 'Deutsch',
|
||||
active: true,
|
||||
}]
|
||||
};
|
||||
|
14
src/environments/environment.travis.ts
Normal file
14
src/environments/environment.travis.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { environment as defaultEnv } from './environment.common';
|
||||
import { GlobalConfig } from '../config/global-config.interface';
|
||||
import { ServerConfig } from '../config/server-config.interface';
|
||||
|
||||
export const environment: GlobalConfig = {
|
||||
...defaultEnv,
|
||||
rest: new ServerConfig(
|
||||
false,
|
||||
'localhost',
|
||||
8080,
|
||||
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
|
||||
'/server/api',
|
||||
),
|
||||
};
|
Reference in New Issue
Block a user