diff --git a/src/link/internal.tsx b/src/link/internal.tsx index 41b9a5285e..680d787574 100644 --- a/src/link/internal.tsx +++ b/src/link/internal.tsx @@ -186,7 +186,6 @@ const InternalLink = React.forwardRef( {children} {external && ( -   { const expectedFocusedText = linksIn === 'keys' ? // The external link icon adds an extra space at the end - 'Popularity ' - : '50% '; + 'Popularity' + : '50%'; await page.click('#focus-target'); await page.keys(['Tab']); // Focus the chart await page.keys(['Enter']); // Focus the first chart segment diff --git a/src/top-navigation/__integ__/top-navigation.test.ts b/src/top-navigation/__integ__/top-navigation.test.ts index c59aeb5087..159ebf485b 100644 --- a/src/top-navigation/__integ__/top-navigation.test.ts +++ b/src/top-navigation/__integ__/top-navigation.test.ts @@ -32,7 +32,7 @@ describe('Top navigation', () => { 'renders utilities with text', setupTest(pageWidth, async page => { await expect(page.getText(wrapper.findUtility(1).toSelector())).resolves.toBe('New thing'); - await expect(page.getText(wrapper.findUtility(2).toSelector())).resolves.toBe('Docs '); + await expect(page.getText(wrapper.findUtility(2).toSelector())).resolves.toBe('Docs'); await expect(page.getText(wrapper.findUtility(4).toSelector())).resolves.toBe('John Doe'); }) ); @@ -66,7 +66,7 @@ describe('Top navigation', () => { await expect(page.getText(wrapper.findUtility(1).toSelector())).resolves.toBe('New thing'); // Docs shouldn't be collapsed because it doesn't have an icon. - await expect(page.getText(wrapper.findUtility(2).toSelector())).resolves.toBe('Docs '); + await expect(page.getText(wrapper.findUtility(2).toSelector())).resolves.toBe('Docs'); }) ); });