diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php index 593413958962c..d3ab40e1ee6d2 100644 --- a/core/templates/layout.public.php +++ b/core/templates/layout.public.php @@ -29,7 +29,6 @@ - diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index cdc4335f12822..5b03b5a9c8e67 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -44,7 +44,6 @@ - diff --git a/tests/playwright/e2e/core/page-head.spec.ts b/tests/playwright/e2e/core/page-head.spec.ts new file mode 100644 index 0000000000000..5108ff1851e30 --- /dev/null +++ b/tests/playwright/e2e/core/page-head.spec.ts @@ -0,0 +1,39 @@ +/* + * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +import { expect } from '@playwright/test' +import { test as publicTest } from '../../support/fixtures/public-share-page.ts' +import { test as userTest } from '../../support/fixtures/random-user-session.ts' +import { uploadContent } from '../../support/utils/dav.ts' +import { createLinkShare } from '../../support/utils/sharing.ts' + +/** + * The page `
` must declare each icon exactly once: browsers pick the last + * matching `rel`, so a duplicate `apple-touch-icon-precomposed` silently + * overrides the modern `apple-touch-icon`. + */ + +userTest.describe('core: page head', () => { + userTest('user layout emits a single apple-touch-icon', async ({ page }) => { + await page.goto('apps/files') + + await expect(page.locator('head link[rel="apple-touch-icon"]')).toHaveCount(1) + await expect(page.locator('head link[rel="apple-touch-icon-precomposed"]')).toHaveCount(0) + await expect(page.locator('head link[rel="mask-icon"]')).toHaveCount(1) + }) +}) + +publicTest.describe('core: page head', () => { + publicTest('public layout emits a single apple-touch-icon', async ({ page, user, ownerRequest, publicShare }) => { + await uploadContent(ownerRequest, user, '