diff --git a/src/app/core/shared/collection.model.spec.ts b/src/app/core/shared/collection.model.spec.ts index 6c2f015b5b..82e90f05cd 100644 --- a/src/app/core/shared/collection.model.spec.ts +++ b/src/app/core/shared/collection.model.spec.ts @@ -1,8 +1,8 @@ import {Collection} from './collection.model'; -fdescribe('Collection', () => { +describe('Collection', () => { - fdescribe('Collection handle value', () => { + describe('Collection handle value', () => { let metadataValue; let handleValue; diff --git a/src/app/core/shared/community.model.spec.ts b/src/app/core/shared/community.model.spec.ts index 3822509720..1b688c9df9 100644 --- a/src/app/core/shared/community.model.spec.ts +++ b/src/app/core/shared/community.model.spec.ts @@ -1,8 +1,8 @@ import {Community} from './community.model'; -fdescribe('Community', () => { +describe('Community', () => { - fdescribe('Community handle value', () => { + describe('Community handle value', () => { let metadataValue; let handleValue; diff --git a/src/app/shared/comcol-page-handle/comcol-page-handle.component.spec.ts b/src/app/shared/comcol-page-handle/comcol-page-handle.component.spec.ts index 9c4c31a8e8..0fb1b458e1 100644 --- a/src/app/shared/comcol-page-handle/comcol-page-handle.component.spec.ts +++ b/src/app/shared/comcol-page-handle/comcol-page-handle.component.spec.ts @@ -1,15 +1,11 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; import { By } from '@angular/platform-browser'; -import { UIURLCombiner } from 'src/app/core/url-combiner/ui-url-combiner'; import { ComcolPageHandleComponent } from './comcol-page-handle.component'; -const handleWithProtocol = 'http://localhost:4000/handle/123456789/2'; +const handle = 'http://localhost:4000/handle/123456789/2'; -const handleWithoutProtocol = '123456789/2'; -const handleWithoutProtocolUIURLCombined = new UIURLCombiner('/handle/', '123456789/2').toString(); - -describe('ComcolPageHandleComponent', () => { +fdescribe('ComcolPageHandleComponent', () => { let component: ComcolPageHandleComponent; let fixture: ComponentFixture; @@ -38,16 +34,15 @@ describe('ComcolPageHandleComponent', () => { expect(div).toBeNull(); }); - describe('should create a link pointing the handle', () => { + it('should create a link pointing the handle when present', () => { - it('should use the content if it includes the http protocol', () => { - component.content = handleWithProtocol; - fixture.detectChanges(); + component.content = handle; + fixture.detectChanges(); + + const link = fixture.debugElement.query(By.css('a')); + expect(link.nativeElement.getAttribute('href')).toBe(handle); + expect(link.nativeElement.innerHTML).toBe(handle); - const link = fixture.debugElement.query(By.css('a')); - expect(link.nativeElement.getAttribute('href')).toBe(handleWithProtocol); - expect(link.nativeElement.innerHTML).toBe(handleWithProtocol); - }); }); });