diff --git a/apps/website/e2e/header-models-navigation.spec.ts b/apps/website/e2e/header-models-navigation.spec.ts index 984329b858d..6e8c09767a8 100644 --- a/apps/website/e2e/header-models-navigation.spec.ts +++ b/apps/website/e2e/header-models-navigation.spec.ts @@ -120,7 +120,7 @@ for (const { locale, path } of [ } } -test('Hub menu marks only external links with the arrow', async ({ +test('Hub menu apps open in the same tab and only external links carry the arrow', async ({ context, page }) => { @@ -143,13 +143,13 @@ test('Hub menu marks only external links with the arrow', async ({ name: 'Cinematic Studio', exact: true }) - await expect(cinematicStudio).toHaveAttribute('target', '_blank') + await expect(cinematicStudio).not.toHaveAttribute('target') await expect(cinematicStudio.getByTestId('external-link-arrow')).toHaveCount( 0 ) const reshoot = dropdown.getByRole('link', { name: 'Re-shoot', exact: true }) - await expect(reshoot).toHaveAttribute('target', '_blank') + await expect(reshoot).not.toHaveAttribute('target') await expect(reshoot.getByTestId('external-link-arrow')).toHaveCount(0) await desktopLinks diff --git a/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts b/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts index 4c6042d5e93..684ec6acdb3 100644 --- a/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts +++ b/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts @@ -99,13 +99,11 @@ describe('HeaderMainDesktop', () => { }) it.for(['Cinematic Studio', 'Re-shoot'])( - 'opens the %s app in a tab of its own', + 'opens the %s app in the same tab', async (name) => { const menu = await openHub() - const link = menu.getByRole('link', { name }) - expect(link).toHaveAttribute('target', '_blank') - expect(link).toHaveAttribute('rel', 'noopener') + expect(menu.getByRole('link', { name })).not.toHaveAttribute('target') } ) diff --git a/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts b/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts index fd52b9925d8..5d4ec90f9d8 100644 --- a/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts +++ b/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts @@ -56,9 +56,8 @@ describe('HeaderMainMobile', () => { '/hub/apps/reshoot/', '/hub/apps/' ]) - expect(screen.getByRole('link', { name: 'Re-shoot' })).toHaveAttribute( - 'target', - '_blank' + expect(screen.getByRole('link', { name: 'Re-shoot' })).not.toHaveAttribute( + 'target' ) expect(screen.getByRole('link', { name: 'All apps' })).not.toHaveAttribute( 'target' diff --git a/apps/website/src/data/mainNavigation.test.ts b/apps/website/src/data/mainNavigation.test.ts index a0cbf779f5a..013f2775967 100644 --- a/apps/website/src/data/mainNavigation.test.ts +++ b/apps/website/src/data/mainNavigation.test.ts @@ -139,9 +139,13 @@ describe('getMainNavigation', () => { { label: 'Cinematic Studio', href: '/hub/apps/cinematic-studio/', - newTab: true + newTab: undefined }, - { label: 'Re-shoot', href: '/hub/apps/reshoot/', newTab: true } + { + label: 'Re-shoot', + href: '/hub/apps/reshoot/', + newTab: undefined + } ], allLink: { label: 'All apps', href: '/hub/apps/' } } diff --git a/apps/website/src/data/mainNavigation.ts b/apps/website/src/data/mainNavigation.ts index 70284dcefec..f9c5c07f83e 100644 --- a/apps/website/src/data/mainNavigation.ts +++ b/apps/website/src/data/mainNavigation.ts @@ -150,13 +150,11 @@ export function getMainNavigation( items: [ { label: t('nav.cinematicStudio'), - href: routes.cinematicStudio, - newTab: true + href: routes.cinematicStudio }, ...when(hubSections.reshoot, { label: t('nav.reshoot'), - href: routes.reshoot, - newTab: true + href: routes.reshoot }) ], allLink: { label: t('nav.hubAllApps'), href: routes.hubApps }