Skip to content
Permalink
Browse files
refactor: remove CoreModule dependency (DSP-1884) (#519)
* 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 8549104be4bfdbe9bdc4362a1a82db0f0c1619c7
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 59 deletions.
@@ -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';
@@ -320,7 +320,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
ColorPickerModule,
CommonModule,
DspActionModule,
DspCoreModule,
DspSearchModule,
DspViewerModule,
FormsModule,
@@ -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';

@@ -18,7 +18,6 @@ describe('CacheService', () => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
DspCoreModule,
DspActionModule,
MatDialogModule,
MatSnackBarModule
@@ -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';

@@ -21,7 +21,6 @@ describe('ErrorHandlerService', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatDialogModule,
MatSnackBarModule
],
@@ -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';
@@ -39,7 +39,6 @@ describe('BoardComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatChipsModule,
MatDialogModule,
MatDividerModule,
@@ -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';
@@ -29,7 +29,6 @@ describe('AddUserComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatAutocompleteModule,
MatDialogModule,
MatIconModule,
@@ -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';
@@ -40,7 +40,6 @@ describe('CollaborationComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatAutocompleteModule,
MatButtonModule,
MatChipsModule,
@@ -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';
@@ -27,7 +27,6 @@ describe('SelectGroupComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspCoreModule,
MatDialogModule,
MatFormFieldModule,
MatSelectModule,
@@ -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';
@@ -86,7 +86,6 @@ describe('ListInfoFormComponent', () => {
BrowserAnimationsModule,
HttpClientModule,
DspActionModule,
DspCoreModule,
MatIconModule,
MatInputModule,
ReactiveFormsModule,
@@ -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';
@@ -91,7 +91,6 @@ describe('ListComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDialogModule,
MatIconModule,
@@ -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';
@@ -31,7 +31,6 @@ describe('OntologyFormComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
HttpClientTestingModule,
MatFormFieldModule,
MatInputModule,
@@ -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';
@@ -71,7 +71,6 @@ describe('OntologyVisualizerComponent', () => {
imports: [
HttpClientTestingModule,
DspActionModule,
DspCoreModule,
MatRadioModule,
MatSliderModule,
MatSlideToggleModule,
@@ -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';
@@ -63,7 +63,6 @@ describe('OntologyComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
HttpClientTestingModule,
MatCardModule,
MatDialogModule,
@@ -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';
@@ -29,7 +29,6 @@ describe('ProjectFormComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatChipsModule,
MatIconModule,
MatInputModule,
@@ -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';
@@ -25,7 +25,6 @@ describe('ProjectComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatIconModule,
MatTabsModule,
RouterTestingModule
@@ -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';
@@ -29,7 +29,6 @@ describe('ProjectsListComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
@@ -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';
@@ -30,7 +30,6 @@ describe('ProjectsComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
@@ -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';
@@ -34,7 +34,6 @@ describe('UsersListComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
@@ -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';
@@ -34,7 +34,6 @@ describe('UsersComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
@@ -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';
@@ -32,7 +32,6 @@ describe('AccountComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDialogModule,
MatFormFieldModule,
@@ -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';
@@ -31,7 +31,6 @@ describe('DashboardComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatChipsModule,
MatIconModule,
@@ -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';
@@ -29,7 +29,6 @@ describe('MembershipComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDividerModule,
MatIconModule,
@@ -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';
@@ -27,7 +27,6 @@ describe('ProfileComponent', () => {
imports: [
BrowserAnimationsModule,
DspActionModule,
DspCoreModule,
MatButtonModule,
MatDialogModule,
MatDividerModule,

0 comments on commit 8549104

Please sign in to comment.