Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump js-lib to latest (DEV-669) #687

Merged
merged 5 commits into from Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"@angular/platform-browser-dynamic": "^13.2.6",
"@angular/router": "^13.2.6",
"@ckeditor/ckeditor5-angular": "^2.0.2",
"@dasch-swiss/dsp-js": "^7.0.0",
"@dasch-swiss/dsp-js": "^7.0.1",
"@datadog/browser-rum": "^3.11.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "6.0.0",
Expand Down
15 changes: 8 additions & 7 deletions src/app/main/error/error-handler.service.spec.ts
Expand Up @@ -3,7 +3,7 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/
import { TestBed } from '@angular/core/testing';
import { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
import { HealthEndpointSystem, MockHealth } from '@dasch-swiss/dsp-js';
import { of } from 'rxjs';
import { DspApiConnectionToken } from '../declarations/dsp-api-tokens';
Expand Down Expand Up @@ -33,16 +33,17 @@ describe('ErrorHandlerService', () => {
BrowserAnimationsModule,
HttpClientTestingModule,
MatDialogModule,
MatSnackBarModule
MatSnackBarModule,
NoopAnimationsModule
],
providers: [
{
provide: DspApiConnectionToken,
useValue: apiEndpointSpyObj
},
{
provide: MatDialog,
useValue: { open: () => of({ id: 1 }) }
},
{
provide: DspApiConnectionToken,
useValue: apiEndpointSpyObj
}
]
});
Expand All @@ -53,7 +54,7 @@ describe('ErrorHandlerService', () => {
const dspConnSpy = TestBed.inject(DspApiConnectionToken);
(dspConnSpy.system.healthEndpoint as jasmine.SpyObj<HealthEndpointSystem>).getHealthStatus.and.callFake(
() => {
const health = MockHealth.mockStopped();
const health = MockHealth.mockRunning();
return of(health);
}
);
Expand Down
18 changes: 15 additions & 3 deletions src/app/main/error/error.component.spec.ts
@@ -1,16 +1,19 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { HealthEndpointSystem, MockHealth } from '@dasch-swiss/dsp-js';
import { of } from 'rxjs';
import { DspApiConnectionToken } from '../declarations/dsp-api-tokens';
import { ErrorComponent } from './error.component';

describe('ErrorComponent', () => {
let component: ErrorComponent;
let fixture: ComponentFixture<ErrorComponent>;

const systemEndpointSpyObj = {
health: {
const apiEndpointSpyObj = {
system: {
healthEndpoint: jasmine.createSpyObj('healthEndpoint', ['getHealthStatus'])
}
};
Expand All @@ -19,6 +22,7 @@ describe('ErrorComponent', () => {
TestBed.configureTestingModule({
declarations: [ErrorComponent],
imports: [
BrowserAnimationsModule,
MatIconModule,
RouterTestingModule
],
Expand All @@ -29,7 +33,7 @@ describe('ErrorComponent', () => {
},
{
provide: DspApiConnectionToken,
useValue: systemEndpointSpyObj
useValue: apiEndpointSpyObj
},
]
})
Expand All @@ -40,6 +44,14 @@ describe('ErrorComponent', () => {
fixture = TestBed.createComponent(ErrorComponent);
component = fixture.componentInstance;
fixture.detectChanges();

const dspConnSpy = TestBed.inject(DspApiConnectionToken);
(dspConnSpy.system.healthEndpoint as jasmine.SpyObj<HealthEndpointSystem>).getHealthStatus.and.callFake(
() => {
const health = MockHealth.mockRunning();
return of(health);
}
);
});

it('should create', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/app/user/user.component.spec.ts
Expand Up @@ -10,6 +10,7 @@ import { MatInputModule } from '@angular/material/input';
import { MatMenuModule } from '@angular/material/menu';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatTabsModule } from '@angular/material/tabs';
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';
Expand Down Expand Up @@ -47,6 +48,7 @@ describe('UserComponent', () => {
UserComponent
],
imports: [
BrowserAnimationsModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
Expand Down