diff --git a/playwright.config.ts b/playwright.config.ts index 3906232abc..a1781ff3bb 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -76,13 +76,6 @@ export default { }, }, - { - name: 'webkit', - use: { - ...devices['Desktop Safari'], - }, - }, - /* Test against mobile viewports. */ { name: 'Mobile Chrome', @@ -91,12 +84,6 @@ export default { permissions: ['clipboard-read', 'clipboard-write'], }, }, - { - name: 'Mobile Safari', - use: { - ...devices['iPhone 12'], - }, - }, ], /* Folder for test artifacts created during test execution such as screenshots, traces, etc. */ diff --git a/tests/e2e/README.md b/tests/e2e/README.md index 0782ac6676..93f5a3f085 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -269,17 +269,6 @@ If you want to iterate fast, save your time and only run very selected tests. Use only one browser. -### Skip Safari if it doesn't work - -Many contributors have issues getting Safari (webkit) -and especially Safari Mobile to work. - -At the top of your test function, you can use: - -~~~javascript -test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile.'); -~~~ - ### Don't forget the formatting. When writing tests without modifying other frontend code, diff --git a/tests/e2e/actions.test.e2e.ts b/tests/e2e/actions.test.e2e.ts index 083b25a7b9..4a1b8a3ec2 100644 --- a/tests/e2e/actions.test.e2e.ts +++ b/tests/e2e/actions.test.e2e.ts @@ -9,14 +9,13 @@ // routers/web/repo/actions/** // @watch end -import {expect, type Page, type TestInfo} from '@playwright/test'; +import {expect, type Page} from '@playwright/test'; import {test} from './utils_e2e.ts'; import {screenshot} from './shared/screenshots.ts'; const workflow_trigger_notification_text = 'This workflow has a workflow_dispatch event trigger.'; -async function dispatchSuccess(page: Page, testInfo: TestInfo) { - test.skip(testInfo.project.name === 'Mobile Safari', 'Flaky behaviour on mobile safari; see https://codeberg.org/forgejo/forgejo/pulls/3334#issuecomment-2033383'); +async function dispatchSuccess(page: Page) { await page.goto('/user2/test_workflows/actions?workflow=test-dispatch.yml&actor=0&status=0'); await page.locator('#workflow_dispatch_dropdown>button').click(); @@ -49,9 +48,7 @@ test.describe('Workflow Authenticated user2', () => { await screenshot(page, page.locator('div.ui.container').filter({hasText: 'All workflows'})); }); - test('dispatch error: missing inputs', async ({page}, testInfo) => { - test.skip(testInfo.project.name === 'Mobile Safari', 'Flaky behaviour on mobile safari; see https://codeberg.org/forgejo/forgejo/pulls/3334#issuecomment-2033383'); - + test('dispatch error: missing inputs', async ({page}) => { await page.goto('/user2/test_workflows/actions?workflow=test-dispatch.yml&actor=0&status=0'); await page.locator('#workflow_dispatch_dropdown>button').click(); @@ -70,8 +67,8 @@ test.describe('Workflow Authenticated user2', () => { // no assertions as the login in this test case is extracted for reuse // eslint-disable-next-line playwright/expect-expect - test('dispatch success', async ({page}, testInfo) => { - await dispatchSuccess(page, testInfo); + test('dispatch success', async ({page}) => { + await dispatchSuccess(page); }); }); @@ -100,7 +97,7 @@ async function simulatePollingInterval(page: Page) { test.describe('workflow list dynamic refresh', () => { test.use({user: 'user2'}); - test('refreshes on visibility change', async ({page}, testInfo) => { + test('refreshes on visibility change', async ({page}) => { // Test operates by creating two pages; one which is sitting idle on the workflows list (backgroundPage), and one // which triggers a workflow dispatch. Then a document visibilitychange event is fired on the background page to // mimic a user returning to the tab on their browser, which should trigger the workflow list to refresh and display @@ -110,7 +107,7 @@ test.describe('workflow list dynamic refresh', () => { await backgroundPage.goto('/user2/test_workflows/actions?workflow=test-dispatch.yml&actor=0&status=0'); // Mirror the `Workflow Authenticated user2 > dispatch success` test: - await dispatchSuccess(page, testInfo); + await dispatchSuccess(page); const latestDispatchedRun = await page.locator('.run-list>:first-child .flex-item-body>b').textContent(); expect(latestDispatchedRun).toMatch(/^#/); // workflow ID, eg. "#53" @@ -123,7 +120,7 @@ test.describe('workflow list dynamic refresh', () => { await screenshot(backgroundPage, page.locator('div.ui.container').filter({hasText: 'All workflows'})); }); - test('refreshes on interval', async ({page}, testInfo) => { + test('refreshes on interval', async ({page}) => { // Test operates by creating two pages; one which is sitting idle on the workflows list (backgroundPage), and one // which triggers a workflow dispatch. After the polling, the page should refresh and show the newly dispatched // workflow from the other page. @@ -132,7 +129,7 @@ test.describe('workflow list dynamic refresh', () => { await backgroundPage.goto('/user2/test_workflows/actions?workflow=test-dispatch.yml&actor=0&status=0'); // Mirror the `Workflow Authenticated user2 > dispatch success` test: - await dispatchSuccess(page, testInfo); + await dispatchSuccess(page); const latestDispatchedRun = await page.locator('.run-list>:first-child .flex-item-body>b').textContent(); expect(latestDispatchedRun).toMatch(/^#/); // workflow ID, eg. "#53" @@ -141,13 +138,13 @@ test.describe('workflow list dynamic refresh', () => { await screenshot(backgroundPage, page.locator('div.ui.container').filter({hasText: 'All workflows'})); }); - test('post-refresh the dropdowns continue to operate', async ({page}, testInfo) => { + test('post-refresh the dropdowns continue to operate', async ({page}) => { // Verify that after the page is dynamically refreshed, the 'Actor', 'Status', and 'Run workflow' dropdowns work // correctly -- that the htmx morph hasn't messed up any JS event handlers. await page.goto('/user2/test_workflows/actions?workflow=test-dispatch.yml&actor=0&status=0'); // Mirror the `Workflow Authenticated user2 > dispatch success` test -- this creates data for the 'Actor' dropdown - await dispatchSuccess(page, testInfo); + await dispatchSuccess(page); // Perform a dynamic refresh before checking the functionality of each dropdown. await simulatePollingInterval(page); @@ -171,14 +168,14 @@ test.describe('workflow list dynamic refresh', () => { await expect(page.getByText('All Actors')).toBeVisible(); }); - test('refresh does not break interacting with open drop-downs', async ({page}, testInfo) => { + test('refresh does not break interacting with open drop-downs', async ({page}) => { // Verify that if the polling refresh occurs while interacting with any multi-step dropdown on the page, the // multi-step interaction continues to be visible and functional. This is implemented by preventing the refresh, // but that isn't the subject of the test here -- as long as the dropdown isn't broken by the refresh, that's fine. await page.goto('/user2/test_workflows/actions?workflow=test-dispatch.yml&actor=0&status=0'); // Mirror the `Workflow Authenticated user2 > dispatch success` test -- this creates data for the 'Actor' dropdown - await dispatchSuccess(page, testInfo); + await dispatchSuccess(page); // Workflow run dialog await expect(page.locator('input[name="inputs[string2]"]')).toBeHidden(); diff --git a/tests/e2e/branch-operations.test.e2e.ts b/tests/e2e/branch-operations.test.e2e.ts index e245153e8e..8d8bdf691c 100644 --- a/tests/e2e/branch-operations.test.e2e.ts +++ b/tests/e2e/branch-operations.test.e2e.ts @@ -66,8 +66,7 @@ test('Rename normal branch', async ({page}) => { expect(response?.status()).toBe(200); }); -test('Rename default branch', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name)); +test('Rename default branch', async ({page}) => { let response = await page.goto('/user2/repo1/branches'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/clipboard-copy.test.e2e.ts b/tests/e2e/clipboard-copy.test.e2e.ts index 2d159e8e90..fd1118da2b 100644 --- a/tests/e2e/clipboard-copy.test.e2e.ts +++ b/tests/e2e/clipboard-copy.test.e2e.ts @@ -11,9 +11,7 @@ import {expect} from '@playwright/test'; import {test} from './utils_e2e.ts'; import {screenshot} from './shared/screenshots.ts'; -test('copy src file path to clipboard', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Apple clipboard API addon - starting at just $499!'); - +test('copy src file path to clipboard', async ({page}) => { const response = await page.goto('/user2/repo1/src/branch/master/README.md'); expect(response?.status()).toBe(200); @@ -24,9 +22,7 @@ test('copy src file path to clipboard', async ({page}, workerInfo) => { await screenshot(page, page.getByText('Copied'), 50); }); -test('copy diff file path to clipboard', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Apple clipboard API addon - starting at just $499!'); - +test('copy diff file path to clipboard', async ({page}) => { const response = await page.goto('/user2/repo1/src/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/commit-operations.test.e2e.ts b/tests/e2e/commit-operations.test.e2e.ts index 105fd6cb6f..6ef02b66f8 100644 --- a/tests/e2e/commit-operations.test.e2e.ts +++ b/tests/e2e/commit-operations.test.e2e.ts @@ -11,8 +11,7 @@ import {screenshot} from './shared/screenshots.ts'; test.use({user: 'user2'}); -test('Create branch from commit', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name)); +test('Create branch from commit', async ({page}) => { let response = await page.goto('/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d'); expect(response?.status()).toBe(200); @@ -40,8 +39,7 @@ test('Create branch from commit', async ({page}, workerInfo) => { expect(response?.status()).toBe(200); }); -test('Create tag from commit', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name)); +test('Create tag from commit', async ({page}) => { let response = await page.goto('/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/dimmer.test.e2e.ts b/tests/e2e/dimmer.test.e2e.ts index ffdbf7e20b..3d9524bdc4 100644 --- a/tests/e2e/dimmer.test.e2e.ts +++ b/tests/e2e/dimmer.test.e2e.ts @@ -41,8 +41,7 @@ test('Dimmed modal', async ({page}) => { await screenshot(page, page.locator('.ui.g-modal-confirm.delete.modal'), 50); }); -test('Dimmed overflow', async ({page}, workerInfo) => { - test.skip(['Mobile Safari'].includes(workerInfo.project.name), 'Mouse wheel is not supported in mobile WebKit'); +test('Dimmed overflow', async ({page}) => { await page.goto('/user2/repo1/_new/master/'); // Type in a file name. diff --git a/tests/e2e/issue-comment-dropzone.test.e2e.ts b/tests/e2e/issue-comment-dropzone.test.e2e.ts index 10fd27e714..40bd238dc1 100644 --- a/tests/e2e/issue-comment-dropzone.test.e2e.ts +++ b/tests/e2e/issue-comment-dropzone.test.e2e.ts @@ -8,7 +8,7 @@ // web_src/js/features/repo-legacy.js // @watch end -import {expect, type Locator, type Page, type TestInfo} from '@playwright/test'; +import {expect, type Locator, type Page} from '@playwright/test'; import {test, dynamic_id} from './utils_e2e.ts'; import {screenshot} from './shared/screenshots.ts'; @@ -42,10 +42,7 @@ async function pasteImage(el: Locator) { }); } -async function assertCopy(page: Page, workerInfo: TestInfo, startWith: string) { - const project = workerInfo.project.name; - if (project === 'webkit' || project === 'Mobile Safari') return; - +async function assertCopy(page: Page, startWith: string) { const dropzone = page.locator('.dropzone'); const preview = dropzone.locator('.dz-preview'); const copyLink = preview.locator('.octicon-copy').locator('..'); @@ -55,7 +52,7 @@ async function assertCopy(page: Page, workerInfo: TestInfo, startWith: string) { expect(clipboardContent).toContain(startWith); } -test('Paste image in new comment', async ({page}, workerInfo) => { +test('Paste image in new comment', async ({page}) => { await page.goto('/user2/repo1/issues/new'); const waitForAttachmentUpload = page.waitForResponse((response) => { @@ -70,12 +67,12 @@ test('Paste image in new comment', async ({page}, workerInfo) => { await expect(preview).toHaveCount(1); await expect(preview.locator('.dz-filename')).toHaveText('foo.png'); await expect(preview.locator('.octicon-copy')).toBeVisible(); - await assertCopy(page, workerInfo, '![foo]('); + await assertCopy(page, '![foo]('); await screenshot(page, page.locator('.issue-content-left')); }); -test('Re-add images to dropzone on edit', async ({page}, workerInfo) => { +test('Re-add images to dropzone on edit', async ({page}) => { await page.goto('/user2/repo1/issues/new'); const issueTitle = dynamic_id(); @@ -101,7 +98,7 @@ test('Re-add images to dropzone on edit', async ({page}, workerInfo) => { await expect(preview).toHaveCount(1); await expect(preview.locator('.dz-filename')).toHaveText('foo.png'); await expect(preview.locator('.octicon-copy')).toBeVisible(); - await assertCopy(page, workerInfo, '![foo]('); + await assertCopy(page, '![foo]('); await screenshot(page, page.locator('.issue-content-left')); }); diff --git a/tests/e2e/issue-comment.test.e2e.ts b/tests/e2e/issue-comment.test.e2e.ts index 24b4a66be2..446a8080f1 100644 --- a/tests/e2e/issue-comment.test.e2e.ts +++ b/tests/e2e/issue-comment.test.e2e.ts @@ -18,7 +18,7 @@ for (const run of [ test.describe(`Create issue & comment`, () => { // playwright/valid-title says: [error] Title must be a string test(`${run.title}`, async ({browser}, workerInfo) => { - test.skip(['Mobile Chrome', 'Mobile Safari'].includes(workerInfo.project.name), 'Mobile Chrome has trouble clicking Comment button with JS enabled, Mobile Safari is flaky and only passes on retry'); + test.skip(['Mobile Chrome'].includes(workerInfo.project.name), 'Mobile Chrome has trouble clicking Comment button with JS enabled'); const issueTitle = dynamic_id(); const issueContent = dynamic_id(); @@ -117,8 +117,8 @@ test.describe('Button text replaced by JS', () => { }); }); -test('Hyperlink paste behaviour', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'Mobile Chrome', 'webkit'].includes(workerInfo.project.name), 'Mobile clients seem to have very weird behaviour with this test, which I cannot confirm with real usage'); +test('Hyperlink paste behaviour', async ({page, isMobile}) => { + test.skip(isMobile, 'Mobile clients seem to have very weird behaviour with this test, which I cannot confirm with real usage'); await page.goto('/user2/repo1/issues/new'); await page.locator('textarea').click(); // same URL diff --git a/tests/e2e/issue-sidebar.test.e2e.ts b/tests/e2e/issue-sidebar.test.e2e.ts index f8f0fadbd5..77357944a4 100644 --- a/tests/e2e/issue-sidebar.test.e2e.ts +++ b/tests/e2e/issue-sidebar.test.e2e.ts @@ -49,8 +49,7 @@ test.describe('Pull: Toggle WIP', () => { await check_wip({page}, false); }); - test('simple toggle', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); + test('simple toggle', async ({page}) => { // toggle to WIP await toggle_wip_to({page}, true); await check_wip({page}, true); @@ -59,8 +58,7 @@ test.describe('Pull: Toggle WIP', () => { await check_wip({page}, false); }); - test('manual edit', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); + test('manual edit', async ({page}) => { await page.goto('/user2/repo1/pulls/5'); // manually edit title to another prefix await page.locator('#issue-title-edit-show').click(); @@ -72,8 +70,7 @@ test.describe('Pull: Toggle WIP', () => { await check_wip({page}, false); }); - test('maximum title length', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); + test('maximum title length', async ({page}) => { await page.goto('/user2/repo1/pulls/5'); // check maximum title length is handled gracefully const maxLenStr = prTitle + 'a'.repeat(240); @@ -91,9 +88,7 @@ test.describe('Pull: Toggle WIP', () => { }); }); -test('Issue: Labels', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); - +test('Issue: Labels', async ({page}) => { async function submitLabels({page}: {page: Page}) { const submitted = page.waitForResponse('/user2/repo1/issues/labels'); await page.locator('textarea').first().click(); // close via unrelated element @@ -138,8 +133,7 @@ test('Issue: Labels', async ({page}, workerInfo) => { await expect(labelList.filter({hasText: 'label1'})).toBeVisible(); }); -test('Issue: Assignees', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); +test('Issue: Assignees', async ({page}) => { // select label list in sidebar only const assigneesList = page.locator('.issue-content-right .assignees.list .selected .item a'); @@ -175,8 +169,7 @@ test('Issue: Assignees', async ({page}, workerInfo) => { await expect(page.locator('.ui.assignees.list .item.no-select')).toBeHidden(); }); -test('New Issue: Assignees', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); +test('New Issue: Assignees', async ({page}) => { // select label list in sidebar only const assigneesList = page.locator('.issue-content-right .assignees.list .selected .item'); @@ -216,9 +209,7 @@ test('New Issue: Assignees', async ({page}, workerInfo) => { await screenshot(page, page.locator('div.filter.menu[data-id="#assignee_ids"]'), 30); }); -test('Issue: Milestone', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); - +test('Issue: Milestone', async ({page}) => { const response = await page.goto('/user2/repo1/issues/1'); expect(response?.status()).toBe(200); @@ -239,9 +230,7 @@ test('Issue: Milestone', async ({page}, workerInfo) => { await expect(page.locator('.timeline-item.event').last()).toContainText('user2 removed this from the milestone1 milestone'); }); -test('New Issue: Milestone', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Unable to get tests working on Safari Mobile, see https://codeberg.org/forgejo/forgejo/pulls/3445#issuecomment-1789636'); - +test('New Issue: Milestone', async ({page}) => { const response = await page.goto('/user2/repo1/issues/new'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/login.test.e2e.ts b/tests/e2e/login.test.e2e.ts index 465b9577d4..abc30577e3 100644 --- a/tests/e2e/login.test.e2e.ts +++ b/tests/e2e/login.test.e2e.ts @@ -11,8 +11,7 @@ import {expect} from '@playwright/test'; import {test, test_context} from './utils_e2e.ts'; import {screenshot} from './shared/screenshots.ts'; -test('Mismatched ROOT_URL', async ({browser}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'init script gets randomly ignored'); +test('Mismatched ROOT_URL', async ({browser}) => { const context = await test_context(browser); const page = await context.newPage(); diff --git a/tests/e2e/markdown-editor.test.e2e.ts b/tests/e2e/markdown-editor.test.e2e.ts index 132fa23988..3f6e1608b6 100644 --- a/tests/e2e/markdown-editor.test.e2e.ts +++ b/tests/e2e/markdown-editor.test.e2e.ts @@ -13,9 +13,7 @@ import {screenshot} from './shared/screenshots.ts'; test.use({user: 'user2'}); -test('Markdown image preview behaviour', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Flaky behaviour on mobile safari;'); - +test('Markdown image preview behaviour', async ({page}) => { // Editing the root README.md file for image preview const editPath = '/user2/repo1/src/branch/master/README.md'; @@ -374,9 +372,7 @@ test('Markdown insert table', async ({page}) => { await screenshot(page); }); -test('Markdown insert link', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Unreliable in this test'); - +test('Markdown insert link', async ({page}) => { const response = await page.goto('/user2/repo1/issues/new'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/markup.test.e2e.ts b/tests/e2e/markup.test.e2e.ts index a5e859f677..7e6bdf8651 100644 --- a/tests/e2e/markup.test.e2e.ts +++ b/tests/e2e/markup.test.e2e.ts @@ -6,8 +6,7 @@ import {expect} from '@playwright/test'; import {test} from './utils_e2e.ts'; import {screenshot} from './shared/screenshots.ts'; -test('markup with #xyz-mode-only', async ({page}, workerInfo) => { - test.skip(['webkit', 'Mobile Safari'].includes(workerInfo.project.name), 'Newest version contains a regression'); +test('markup with #xyz-mode-only', async ({page}) => { const response = await page.goto('/user2/repo1/issues/1'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/modal.test.e2e.ts b/tests/e2e/modal.test.e2e.ts index 946a7f6d46..67d755bcb3 100644 --- a/tests/e2e/modal.test.e2e.ts +++ b/tests/e2e/modal.test.e2e.ts @@ -12,8 +12,7 @@ import {screenshot} from './shared/screenshots.ts'; test.use({user: 'user2'}); -test('Dialog modal', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'keyboard shortcuts do not work'); +test('Dialog modal', async ({page}) => { let response = await page.goto('/user2/repo1/_new/master', {waitUntil: 'domcontentloaded'}); expect(response?.status()).toBe(200); diff --git a/tests/e2e/org-settings.test.e2e.ts b/tests/e2e/org-settings.test.e2e.ts index f74dcf139f..f0e89e0343 100644 --- a/tests/e2e/org-settings.test.e2e.ts +++ b/tests/e2e/org-settings.test.e2e.ts @@ -11,9 +11,7 @@ import {validate_form} from './shared/forms.ts'; test.use({user: 'user2'}); -test('org team settings', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Unreliable in this test'); - +test('org team settings', async ({page}) => { const response = await page.goto('/org/org3/teams/team1/edit'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/profile_actions.test.e2e.ts b/tests/e2e/profile_actions.test.e2e.ts index 8f4293d749..5935de5e7f 100644 --- a/tests/e2e/profile_actions.test.e2e.ts +++ b/tests/e2e/profile_actions.test.e2e.ts @@ -11,9 +11,7 @@ import {screenshot} from './shared/screenshots.ts'; test.use({user: 'user2'}); -test('Follow and block actions', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Mobile Safari is unreliable in this test'); - +test('Follow and block actions', async ({page}) => { await page.goto('/user1'); // Check if following and then unfollowing works. diff --git a/tests/e2e/release.test.e2e.ts b/tests/e2e/release.test.e2e.ts index 3d37b34e77..bf2d6b6d4b 100644 --- a/tests/e2e/release.test.e2e.ts +++ b/tests/e2e/release.test.e2e.ts @@ -16,8 +16,8 @@ import {validate_form} from './shared/forms.ts'; test.use({user: 'user2'}); test.describe('Releases', () => { - test('External Release Attachments', async ({page, isMobile}, workerInfo) => { - test.skip(isMobile || workerInfo.project.name === 'webkit'); + test('External Release Attachments', async ({page, isMobile}) => { + test.skip(isMobile); // Click "New Release" await page.goto('/user2/repo2/releases'); diff --git a/tests/e2e/repo-code.test.e2e.ts b/tests/e2e/repo-code.test.e2e.ts index 48f881af80..49cc210506 100644 --- a/tests/e2e/repo-code.test.e2e.ts +++ b/tests/e2e/repo-code.test.e2e.ts @@ -37,9 +37,7 @@ async function assertSelectedLines(page: Page, nums: string[]) { return pageAssertions(); } -test('Line Range Selection', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Unreliable in this test'); - +test('Line Range Selection', async ({page}) => { const filePath = '/user2/repo1/src/branch/master/README.md?display=source'; const response = await page.goto(filePath); @@ -145,9 +143,7 @@ test('File folding', async ({page}) => { await expect(diffFileBody).toBeVisible(); }); -test('Copy line permalink', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Apple clipboard API addon - starting at just $499!'); - +test('Copy line permalink', async ({page}) => { const response = await page.goto('/user2/repo1/src/branch/master/README.md?display=source#L1'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/repo-migrate.test.e2e.ts b/tests/e2e/repo-migrate.test.e2e.ts index 26619547ae..be9c200659 100644 --- a/tests/e2e/repo-migrate.test.e2e.ts +++ b/tests/e2e/repo-migrate.test.e2e.ts @@ -26,9 +26,7 @@ test('Migration type seleciton screen', async ({page}) => { await screenshot(page); }); -test('Migration Repo Name detection', async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Flaky actionability checks on Mobile Safari'); - +test('Migration Repo Name detection', async ({page}) => { await page.goto('/repo/migrate?service_type=2'); const form = page.locator('form'); @@ -54,9 +52,7 @@ test('Migration Repo Name detection', async ({page}, workerInfo) => { await screenshot(page); }); -test('Migration Progress Page', async ({page, browser}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Flaky actionability checks on Mobile Safari'); - +test('Migration Progress Page', async ({page, browser}) => { const repoName = dynamic_id(); expect((await page.goto(`/user2/${repoName}`))?.status(), 'repo should not exist yet').toBe(404); diff --git a/tests/e2e/repo-new.test.e2e.ts b/tests/e2e/repo-new.test.e2e.ts index 68f77c31d6..85bcf1b273 100644 --- a/tests/e2e/repo-new.test.e2e.ts +++ b/tests/e2e/repo-new.test.e2e.ts @@ -93,8 +93,7 @@ test('New repo: initialize later', async ({page}) => { await screenshot(page); }); -test('New repo: from template', async ({page}, workerInfo) => { - test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'WebKit browsers seem to have CORS issues with localhost here.'); +test('New repo: from template', async ({page}) => { const response = await page.goto('/repo/create'); expect(response?.status()).toBe(200); diff --git a/tests/e2e/repo-wiki.test.e2e.ts b/tests/e2e/repo-wiki.test.e2e.ts index 02ada9e6cc..1eb02dfa36 100644 --- a/tests/e2e/repo-wiki.test.e2e.ts +++ b/tests/e2e/repo-wiki.test.e2e.ts @@ -9,9 +9,7 @@ import {screenshot} from './shared/screenshots.ts'; for (const searchTerm of ['space', 'consectetur']) { for (const width of [null, 2560, 4000]) { - test(`Search for '${searchTerm}' and test for no overflow ${width && `on ${width}-wide viewport` || ''}`, async ({page, viewport}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Fails as always, see https://codeberg.org/forgejo/forgejo/pulls/5326#issuecomment-2313275'); - + test(`Search for '${searchTerm}' and test for no overflow ${width && `on ${width}-wide viewport` || ''}`, async ({page, viewport}) => { await page.setViewportSize({ width: width ?? viewport.width, height: 1440, // We're testing that we fit horizontally - vertical scrolling is fine. @@ -24,15 +22,14 @@ for (const searchTerm of ['space', 'consectetur']) { await page.getByPlaceholder('Search wiki').dispatchEvent('keyup'); await expect(page.locator('#wiki-search a[href]')).toBeInViewport({ - ratio: workerInfo.project.name === 'webkit' ? 0.9 : 1, + ratio: 1, }); await screenshot(page); }); } } -test(`Search results show titles (and not file names)`, async ({page}, workerInfo) => { - test.skip(workerInfo.project.name === 'Mobile Safari', 'Fails as always, see https://codeberg.org/forgejo/forgejo/pulls/5326#issuecomment-2313275'); +test(`Search results show titles (and not file names)`, async ({page}) => { await page.goto('/user2/repo1/wiki'); await page.getByPlaceholder('Search wiki').fill('spaces'); await page.getByPlaceholder('Search wiki').click(); diff --git a/tests/e2e/utils_e2e_test.go b/tests/e2e/utils_e2e_test.go index efa1657cee..d6ad1ddc57 100644 --- a/tests/e2e/utils_e2e_test.go +++ b/tests/e2e/utils_e2e_test.go @@ -83,9 +83,7 @@ func createSessions(t testing.TB) { browsers := []string{ "chromium", "firefox", - "webkit", "Mobile Chrome", - "Mobile Safari", } scopes := []string{ "shared",