From 33f4072201f23df430dfefc62fa7f4812ae4202e Mon Sep 17 00:00:00 2001 From: Martin <git@mail.de> Date: Thu, 6 Mar 2025 12:17:46 +0100 Subject: [PATCH] remove encodingUri --- .../src/lib/list/list-item/list-item.component.spec.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts b/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts index 7bfdff811e..2e2714f6cf 100644 --- a/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts +++ b/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts @@ -32,6 +32,8 @@ describe('ListItemComponent', () => { let component: ListItemComponent; let fixture: ComponentFixture<ListItemComponent>; + const link: string = getDataTestClassOf('list-item-link'); + beforeEach(async () => { await TestBed.configureTestingModule({ imports: [ListItemComponent], @@ -50,13 +52,12 @@ describe('ListItemComponent', () => { describe('input', () => { describe('routerLink', () => { it('should set href attribute', () => { - component.path = encodeURI(faker.system.filePath()); - const resultingLink: string = 'http://localhost' + component.path; - const linkElement: HTMLLinkElement = getElementFromFixture(fixture, getDataTestClassOf('list-item-link')); + component.path = faker.system.filePath(); fixture.detectChanges(); - expect(linkElement.href).toBe(resultingLink); + const linkElement: HTMLLinkElement = getElementFromFixture(fixture, link); + expect(linkElement.href).toBe(`http://localhost${component.path}`); }); }); }); -- GitLab