mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-31 18:45:03 +00:00
Backport https://github.com/go-gitea/gitea/pull/39432 - A `#L0` URL hash made `selectRange` index the line list at -1 and throw inside `initRepoCodeView`, which aborted every init function after it on the page. Line numbers below 1 now select nothing. - The JS error filter only accepted stacks under the asset prefix, but the vite dev server serves the sources from `/web_src/`, so dev mode dropped every error without showing a banner. Outside production, the filter now also accepts stacks from `/web_src/`.
import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {apiCreateRepo, randomString} from './utils.ts';
test('repo readme', async ({page}) => {
const repoName = `e2e-readme-${randomString(8)}`;
await apiCreateRepo(page.request, {name: repoName});
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}`);
await expect(page.locator('#readme')).toContainText(repoName);
});