Commit 5df0a601 authored by rajkumar's avatar rajkumar
Browse files

updating TaxonomyRegistrationError

parent b2fa2b8f
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NonSubmissionResultDialogComponent } from './non-submission-result-dialog.component';
describe('NonSubmissionResultDialogComponent', () => {
let component: NonSubmissionResultDialogComponent;
let fixture: ComponentFixture<NonSubmissionResultDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [NonSubmissionResultDialogComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NonSubmissionResultDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
/*
* Copyright 2018 EMBL - European Bioinformatics Institute
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { UiModule } from '../ui/ui.module';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { WebinAuthenticationService } from '../webin-authentication.service';
import { MockWebinAuthenticationService } from '../mock/mock-webin-authentication.service';
import { WebinRestService } from '../webin-rest.service';
import { MockWebinRestService } from '../mock/mock-webin-rest.service';
import { SubmissionResultComponent } from '../submission-result/submission-result.component';
import { SubmissionResultDialogComponent } from './submission-result-dialog.component';
describe('SubmissionResultDialogComponent', () => {
let component: SubmissionResultDialogComponent;
let fixture: ComponentFixture<SubmissionResultDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
SubmissionResultComponent,
SubmissionResultDialogComponent],
imports: [UiModule],
providers: [
{
provide: WebinAuthenticationService,
useClass: MockWebinAuthenticationService
},
{
provide: WebinRestService,
useClass: MockWebinRestService
},
{
provide: MatDialogRef,
useValue: {
close: (dialogResult: any) => { }
}
},
{
provide: MAT_DIALOG_DATA,
useValue: null
},
]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SubmissionResultDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
......@@ -83,8 +83,8 @@ export class TaxonomyManagementComponent implements OnInit {
if (observable) {
observable.pipe(retry(3)).subscribe(
(data) => {
if (data.indexOf("TaxonomyError") > -1) {
data = data.replace("TaxonomyError:", "");
if (data.indexOf("TaxonomyRegistrationError") > -1) {
data = data.replace("TaxonomyRegistrationError:", "");
this.showErrorPopup(data);
} else {
let result = JSON.parse(data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment