From bd60f00a77baef4909f30cc869b31ab849665ee0 Mon Sep 17 00:00:00 2001 From: mdelez <60604010+mdelez@users.noreply.github.com> Date: Tue, 7 Sep 2021 14:02:43 +0200 Subject: [PATCH] refactor: removes ActionModule dependency (#523) --- src/app/app.component.spec.ts | 7 ++++-- src/app/app.module.ts | 3 +-- .../login-form/login-form.component.html | 4 +-- src/app/main/cache/cache.service.spec.ts | 2 -- src/app/main/dialog/dialog.component.spec.ts | 2 -- .../main/error/error-handler.service.spec.ts | 2 -- src/app/main/header/header.component.spec.ts | 6 +++-- src/app/main/login/login.component.spec.ts | 2 -- src/app/main/main.component.html | 2 +- src/app/main/main.component.spec.ts | 5 ++-- src/app/project/board/board.component.html | 2 +- src/app/project/board/board.component.spec.ts | 5 ++-- .../add-user/add-user.component.html | 2 +- .../add-user/add-user.component.spec.ts | 5 ++-- .../collaboration.component.html | 2 +- .../collaboration.component.spec.ts | 7 ++++-- .../list-info-form.component.spec.ts | 7 +++--- .../edit-list-item.component.spec.ts | 7 ++++-- .../list-item-form.component.spec.ts | 4 +-- .../list-item/list-item.component.spec.ts | 8 +++--- src/app/project/list/list.component.spec.ts | 4 +-- .../ontology-form.component.html | 4 +-- .../ontology-form.component.spec.ts | 7 ++++-- .../ontology-visualizer.component.spec.ts | 3 +-- .../project/ontology/ontology.component.html | 8 +++--- .../ontology/ontology.component.spec.ts | 4 +-- .../property-form.component.spec.ts | 6 +++-- .../property-info.component.html | 2 +- .../property-info.component.spec.ts | 2 -- .../resource-class-form.component.spec.ts | 6 +++-- .../resource-class-info.component.html | 2 +- .../resource-class-info.component.spec.ts | 25 ++++++++++++++++--- .../permission/permission.component.html | 2 +- .../permission/permission.component.spec.ts | 7 ++++-- .../project-form.component.spec.ts | 7 ++++-- src/app/project/project.component.html | 2 +- src/app/project/project.component.spec.ts | 7 ++++-- .../groups-list/groups-list.component.html | 2 +- .../groups-list/groups-list.component.spec.ts | 2 -- src/app/system/groups/groups.component.html | 2 +- .../system/groups/groups.component.spec.ts | 6 +++-- .../projects-list.component.html | 4 +-- .../projects-list.component.spec.ts | 5 ++-- .../system/projects/projects.component.html | 4 +-- .../projects/projects.component.spec.ts | 5 ++-- src/app/system/system.component.spec.ts | 2 -- .../users-list/users-list.component.html | 6 ++--- .../users-list/users-list.component.spec.ts | 5 ++-- src/app/system/users/users.component.html | 2 +- src/app/system/users/users.component.spec.ts | 5 ++-- src/app/user/account/account.component.html | 2 +- .../user/account/account.component.spec.ts | 5 ++-- .../collection-list.component.html | 2 +- .../collection-list.component.spec.ts | 6 +++-- .../user/dashboard/dashboard.component.html | 2 +- .../dashboard/dashboard.component.spec.ts | 7 ++++-- .../user/membership/membership.component.html | 2 +- .../membership/membership.component.spec.ts | 7 ++++-- src/app/user/profile/profile.component.html | 6 ++--- .../user/profile/profile.component.spec.ts | 5 ++-- .../password-form.component.html | 6 ++--- .../password-form.component.spec.ts | 7 ++++-- .../user/user-form/user-form.component.html | 4 +-- .../user-form/user-form.component.spec.ts | 7 ++++-- .../user/user-menu/user-menu.component.html | 2 +- .../user-menu/user-menu.component.spec.ts | 7 ++++-- src/app/user/user.component.html | 2 +- src/app/user/user.component.spec.ts | 5 ++-- .../intermediate.component.spec.ts | 8 +++--- .../resource/project.service.spec.ts | 2 -- .../properties/properties.component.spec.ts | 4 +-- .../upload/upload.component.html | 2 +- .../upload/upload.component.spec.ts | 4 +-- .../resource-instance-form.component.spec.ts | 3 +-- .../resource-link-form.component.html | 4 +-- .../resource-link-form.component.spec.ts | 5 ++-- .../resource/resource.component.html | 2 +- 77 files changed, 206 insertions(+), 144 deletions(-) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index b7d3b2c94a..fa0da4ce04 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,12 +1,14 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { waitForAsync, TestBed } from '@angular/core/testing'; +import { MatDialogModule } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatMenuModule } from '@angular/material/menu'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; import { MatToolbarModule } from '@angular/material/toolbar'; import { RouterTestingModule } from '@angular/router/testing'; import { KnoraApiConnection } from '@dasch-swiss/dsp-js'; -import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui'; +import { AppInitService } from '@dasch-swiss/dsp-ui'; import { TranslateModule } from '@ngx-translate/core'; import { TestConfig } from 'test.config'; import { AppComponent } from './app.component'; @@ -27,11 +29,12 @@ describe('AppComponent', () => { ], imports: [ HttpClientTestingModule, + MatDialogModule, MatIconModule, MatListModule, MatMenuModule, + MatSnackBarModule, MatToolbarModule, - DspActionModule, RouterTestingModule, TranslateModule.forRoot() ], diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 93b6f439fe..a2fc45b09a 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -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, DspViewerModule } from '@dasch-swiss/dsp-ui'; +import { 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'; @@ -319,7 +319,6 @@ export function httpLoaderFactory(httpClient: HttpClient) { ClipboardModule, ColorPickerModule, CommonModule, - DspActionModule, DspViewerModule, FormsModule, HttpClientModule, diff --git a/src/app/main/action/login-form/login-form.component.html b/src/app/main/action/login-form/login-form.component.html index 347f1b3bdd..8288480846 100644 --- a/src/app/main/action/login-form/login-form.component.html +++ b/src/app/main/action/login-form/login-form.component.html @@ -42,7 +42,7 @@
Please log out if it's not you.
diff --git a/src/app/main/cache/cache.service.spec.ts b/src/app/main/cache/cache.service.spec.ts index 73d6965956..e2caa25543 100644 --- a/src/app/main/cache/cache.service.spec.ts +++ b/src/app/main/cache/cache.service.spec.ts @@ -2,7 +2,6 @@ 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 } from '@dasch-swiss/dsp-ui'; import { DspApiConnectionToken } from '../declarations/dsp-api-tokens'; import { CacheService } from './cache.service'; @@ -18,7 +17,6 @@ describe('CacheService', () => { TestBed.configureTestingModule({ imports: [ BrowserAnimationsModule, - DspActionModule, MatDialogModule, MatSnackBarModule ], diff --git a/src/app/main/dialog/dialog.component.spec.ts b/src/app/main/dialog/dialog.component.spec.ts index 66123239f1..b195a22a6b 100644 --- a/src/app/main/dialog/dialog.component.spec.ts +++ b/src/app/main/dialog/dialog.component.spec.ts @@ -15,7 +15,6 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatTreeModule } from '@angular/material/tree'; import { RouterTestingModule } from '@angular/router/testing'; -import { DspActionModule } from '@dasch-swiss/dsp-ui'; import { TranslateModule } from '@ngx-translate/core'; import { ListInfoFormComponent } from 'src/app/project/list/list-info-form/list-info-form.component'; import { ListItemFormComponent } from 'src/app/project/list/list-item-form/list-item-form.component'; @@ -54,7 +53,6 @@ describe('DialogComponent', () => { ], imports: [ CommonModule, - DspActionModule, MatAutocompleteModule, MatButtonModule, MatChipsModule, diff --git a/src/app/main/error/error-handler.service.spec.ts b/src/app/main/error/error-handler.service.spec.ts index 8a2ec459bf..4084068a60 100644 --- a/src/app/main/error/error-handler.service.spec.ts +++ b/src/app/main/error/error-handler.service.spec.ts @@ -2,7 +2,6 @@ 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 } from '@dasch-swiss/dsp-ui'; import { DspApiConnectionToken } from '../declarations/dsp-api-tokens'; import { ErrorHandlerService } from './error-handler.service'; @@ -20,7 +19,6 @@ describe('ErrorHandlerService', () => { TestBed.configureTestingModule({ imports: [ BrowserAnimationsModule, - DspActionModule, MatDialogModule, MatSnackBarModule ], diff --git a/src/app/main/header/header.component.spec.ts b/src/app/main/header/header.component.spec.ts index 5d65c69e3c..d765ade934 100644 --- a/src/app/main/header/header.component.spec.ts +++ b/src/app/main/header/header.component.spec.ts @@ -1,15 +1,16 @@ import { HttpClientModule } from '@angular/common/http'; import { Component, Input, OnInit, ViewChild } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { MatDialogModule } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatMenuModule } from '@angular/material/menu'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; import { MatToolbarModule } from '@angular/material/toolbar'; import { By } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { KnoraApiConnection } from '@dasch-swiss/dsp-js'; -import { DspActionModule } from '@dasch-swiss/dsp-ui'; import { TranslateModule } from '@ngx-translate/core'; import { AppInitService } from 'src/app/app-init.service'; import { ComponentCommunicationEventService, EmitEvent, Events } from 'src/app/main/services/component-communication-event.service'; @@ -64,10 +65,11 @@ describe('HeaderComponent', () => { imports: [ BrowserAnimationsModule, HttpClientModule, - DspActionModule, + MatDialogModule, MatIconModule, MatListModule, MatMenuModule, + MatSnackBarModule, MatToolbarModule, RouterTestingModule, TranslateModule.forRoot() diff --git a/src/app/main/login/login.component.spec.ts b/src/app/main/login/login.component.spec.ts index e306b5fc22..aa6f401619 100644 --- a/src/app/main/login/login.component.spec.ts +++ b/src/app/main/login/login.component.spec.ts @@ -3,7 +3,6 @@ import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { RouterTestingModule } from '@angular/router/testing'; import { KnoraApiConnection } from '@dasch-swiss/dsp-js'; -import { DspActionModule } from '@dasch-swiss/dsp-ui'; import { AppInitService } from 'src/app/app-init.service'; import { TestConfig } from 'test.config'; import { DspApiConfigToken, DspApiConnectionToken } from '../declarations/dsp-api-tokens'; @@ -40,7 +39,6 @@ describe('LoginComponent', () => { TestLoginFormComponent ], imports: [ - DspActionModule, RouterTestingModule ], providers: [ diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html index 12e78f0771..c1e6aa57e6 100644 --- a/src/app/main/main.component.html +++ b/src/app/main/main.component.html @@ -76,7 +76,7 @@