From 951a8a71d79db06fda212270b939b75ecb958826 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Mon, 18 Sep 2023 23:46:19 +0200 Subject: [PATCH] catalog: add tests for special characters in namespace and kind Signed-off-by: Vincenzo Scamporlino --- .../src/components/EntityRefLink/EntityRefLink.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.test.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.test.tsx index eb783ae02b..cecf27be24 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.test.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.test.tsx @@ -177,8 +177,8 @@ describe('', () => { it('renders link by encoding name as URI component', async () => { const entityName = { - kind: 'Component', - namespace: 'test', + kind: 'Compone&nt', + namespace: 'tes[t', name: 'softw#are', }; await renderInTestApp( @@ -193,7 +193,7 @@ describe('', () => { ); expect(screen.getByText('Custom Children')).toHaveAttribute( 'href', - '/catalog/test/component/softw%23are', + '/catalog/tes%5Bt/compone%26nt/softw%23are', ); }); });