Skip to content

Commit

Permalink
refactor: remove CoreModule dependency (DSP-1884) (#519)
Browse files Browse the repository at this point in the history
* refactor(test): removes CoreModule dependency from tests

* fix(search-panel): uncomment code for advanced search
  • Loading branch information
mdelez committed Sep 6, 2021
1 parent 5151677 commit 8549104
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 59 deletions.
3 changes: 1 addition & 2 deletions src/app/app.module.ts
Expand Up @@ -7,7 +7,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { DspActionModule, DspCoreModule, DspSearchModule, DspViewerModule } from '@dasch-swiss/dsp-ui';
import { DspActionModule, DspSearchModule, DspViewerModule } from '@dasch-swiss/dsp-ui';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { AngularSplitModule } from 'angular-split';
Expand Down Expand Up @@ -320,7 +320,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
ColorPickerModule,
CommonModule,
DspActionModule,
DspCoreModule,
DspSearchModule,
DspViewerModule,
FormsModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/main/cache/cache.service.spec.ts
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConnectionToken } from '../declarations/dsp-api-tokens';
import { CacheService } from './cache.service';

Expand All @@ -18,7 +18,6 @@ describe('CacheService', () => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
DspCoreModule,
DspActionModule,
MatDialogModule,
MatSnackBarModule
Expand Down
3 changes: 1 addition & 2 deletions src/app/main/error/error-handler.service.spec.ts
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConnectionToken } from '../declarations/dsp-api-tokens';
import { ErrorHandlerService } from './error-handler.service';

Expand All @@ -21,7 +21,6 @@ describe('ErrorHandlerService', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatDialogModule,
MatSnackBarModule
],
Expand Down
3 changes: 1 addition & 2 deletions src/app/project/board/board.component.spec.ts
Expand Up @@ -7,7 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { of } from 'rxjs';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
Expand Down Expand Up @@ -39,7 +39,6 @@ describe('BoardComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatChipsModule,
MatDialogModule,
MatDividerModule,
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
Expand All @@ -29,7 +29,6 @@ describe('AddUserComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatAutocompleteModule,
MatDialogModule,
MatIconModule,
Expand Down
Expand Up @@ -11,7 +11,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
Expand Down Expand Up @@ -40,7 +40,6 @@ describe('CollaborationComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatAutocompleteModule,
MatButtonModule,
MatChipsModule,
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -27,7 +27,6 @@ describe('SelectGroupComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspCoreModule,
MatDialogModule,
MatFormFieldModule,
MatSelectModule,
Expand Down
Expand Up @@ -11,7 +11,7 @@ import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { ApiResponseData, CreateListRequest, ListInfoResponse, ListResponse, ListsEndpointAdmin, UpdateListInfoRequest } from '@dasch-swiss/dsp-js';
import { DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { AjaxResponse } from 'rxjs/ajax';
Expand Down Expand Up @@ -86,7 +86,6 @@ describe('ListInfoFormComponent', () => {
BrowserAnimationsModule,
HttpClientModule,
DspActionModule,
DspCoreModule,
MatIconModule,
MatInputModule,
ReactiveFormsModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/project/list/list.component.spec.ts
Expand Up @@ -16,7 +16,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute, Router } from '@angular/router';
import { ApiResponseData, DeleteListResponse, ListNodeInfo, ListsEndpointAdmin, ListsResponse, MockProjects, ProjectResponse, ProjectsEndpointAdmin, ReadProject } from '@dasch-swiss/dsp-js';
import { DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { AjaxResponse } from 'rxjs/ajax';
Expand Down Expand Up @@ -91,7 +91,6 @@ describe('ListComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDialogModule,
MatIconModule,
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { By } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection, MockProjects } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { CacheService } from 'src/app/main/cache/cache.service';
Expand All @@ -31,7 +31,6 @@ describe('OntologyFormComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
HttpClientTestingModule,
MatFormFieldModule,
MatInputModule,
Expand Down
Expand Up @@ -11,7 +11,7 @@ import {
ResourceClassDefinition,
ResourcePropertyDefinition
} from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { ErrorComponent } from 'src/app/main/error/error.component';
import { TestConfig } from 'test.config';
Expand Down Expand Up @@ -71,7 +71,6 @@ describe('OntologyVisualizerComponent', () => {
imports: [
HttpClientTestingModule,
DspActionModule,
DspCoreModule,
MatRadioModule,
MatSliderModule,
MatSlideToggleModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/project/ontology/ontology.component.spec.ts
Expand Up @@ -15,7 +15,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { ApiResponseData, CanDoResponse, ListNodeInfo, ListsEndpointAdmin, ListsResponse, MockOntology, OntologiesEndpointV2, OntologiesMetadata, ReadOntology } from '@dasch-swiss/dsp-js';
import { DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { of } from 'rxjs';
import { AjaxResponse } from 'rxjs/ajax';
import { CacheService } from 'src/app/main/cache/cache.service';
Expand Down Expand Up @@ -63,7 +63,6 @@ describe('OntologyComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
HttpClientTestingModule,
MatCardModule,
MatDialogModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/project/project-form/project-form.component.spec.ts
Expand Up @@ -6,7 +6,7 @@ import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
Expand All @@ -29,7 +29,6 @@ describe('ProjectFormComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatChipsModule,
MatIconModule,
MatInputModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/project/project.component.spec.ts
Expand Up @@ -4,7 +4,7 @@ import { MatTabsModule } from '@angular/material/tabs';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { TestConfig } from 'test.config';
import { DspApiConfigToken, DspApiConnectionToken } from '../main/declarations/dsp-api-tokens';
import { DialogComponent } from '../main/dialog/dialog.component';
Expand All @@ -25,7 +25,6 @@ describe('ProjectComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatIconModule,
MatTabsModule,
RouterTestingModule
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { MatMenuModule } from '@angular/material/menu';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -29,7 +29,6 @@ describe('ProjectsListComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/system/projects/projects.component.spec.ts
Expand Up @@ -7,7 +7,7 @@ import { MatMenuModule } from '@angular/material/menu';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -30,7 +30,6 @@ describe('ProjectsComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/system/users/users-list/users-list.component.spec.ts
Expand Up @@ -10,7 +10,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { of } from 'rxjs';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
Expand All @@ -34,7 +34,6 @@ describe('UsersListComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/system/users/users.component.spec.ts
Expand Up @@ -9,7 +9,7 @@ import { MatSelectModule } from '@angular/material/select';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -34,7 +34,6 @@ describe('UsersComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/user/account/account.component.spec.ts
Expand Up @@ -8,7 +8,7 @@ import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
Expand All @@ -32,7 +32,6 @@ describe('AccountComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDialogModule,
MatFormFieldModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/user/dashboard/dashboard.component.spec.ts
Expand Up @@ -6,7 +6,7 @@ import { MatMenuModule } from '@angular/material/menu';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -31,7 +31,6 @@ describe('DashboardComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatIconModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/user/membership/membership.component.spec.ts
Expand Up @@ -8,7 +8,7 @@ import { MatSelectModule } from '@angular/material/select';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -29,7 +29,6 @@ describe('MembershipComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDividerModule,
MatIconModule,
Expand Down
3 changes: 1 addition & 2 deletions src/app/user/profile/profile.component.spec.ts
Expand Up @@ -6,7 +6,7 @@ import { MatIconModule } from '@angular/material/icon';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule, DspCoreModule } from '@dasch-swiss/dsp-ui';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
import { ErrorComponent } from 'src/app/main/error/error.component';
Expand All @@ -27,7 +27,6 @@ describe('ProfileComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDialogModule,
MatDividerModule,
Expand Down

0 comments on commit 8549104

Please sign in to comment.