Files
gitea-MIRROR/tests/e2e
Vu Nguyen Anh Tuan 1b073f93b2 refactor: migrate legacy RenderWithErrDeprecated code to "fetch-action" framework (#40565)
The two 2FA login forms relied on the deprecated
`RenderWithErrDeprecated` path, which re-rendered the whole page on a
wrong code and made the submit button send a duplicate request on a
second click. Migrate both forms to `form-fetch-action` and return JSON
errors from the handlers, so the framework's built-in in-flight guard
blocks duplicate submissions and errors are shown as toasts.

Fixes: https://github.com/go-gitea/gitea/issues/27427

Assisted-by: OpenCode:hy4-flash-free

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-11-28 08:02:44 +00:00
..
2026-02-20 16:26:47 -08:00

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);
});