mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-12-07 14:09:47 +00:00
Webkit and Mobile safari are comically unreliable, will fail for unexplainable reasons and are very hard to run locally in comparison with the other supported platforms. I do not remember the last time where these two platforms were able to catch a regression where the other platforms did not. I would like to stress, for the historical record, that many hours has been devoted into adjusting the tests and following best practices to make these two platforms more stable but despite those, IMO wasted, efforts these two platforms are causing many hours of wasted CPU time simply because they are flaky and make (new) contributors nervous if their change contains a regression or not. To my knowledge, the tests are not broken for these two platforms. If you go to the issue tracker you will not find issues by users that use these two platforms and report that Forgejo is broken. It does not reflect reality. This is the sunk cost fallacy, bite the bullet and agree that these platforms will not contribute positively to Forgejo's excellent test suite. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10103 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
// Copyright 2025 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// @watch start
|
|
// templates/user/auth/**
|
|
// web_src/js/features/user-**
|
|
// web_src/js/features/common-global.js
|
|
// @watch end
|
|
|
|
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}) => {
|
|
const context = await test_context(browser);
|
|
const page = await context.newPage();
|
|
|
|
// Ugly hack to override the appUrl of `window.config`.
|
|
await page.addInitScript(() => {
|
|
setInterval(() => {
|
|
if (window.config) {
|
|
window.config.appUrl = 'https://example.com';
|
|
}
|
|
}, 1);
|
|
});
|
|
|
|
const response = await page.goto('/user/login');
|
|
expect(response?.status()).toBe(200);
|
|
|
|
await screenshot(page);
|
|
const globalError = page.locator('.js-global-error');
|
|
await expect(globalError).toContainText('This Forgejo instance is configured to be served on ');
|
|
await expect(globalError).toContainText('You are currently viewing Forgejo through a different URL, which may cause parts of the application to break. The canonical URL is controlled by Forgejo admins via the ROOT_URL setting in the app.ini.');
|
|
});
|