Files
gitea/tests/e2e
silverwind 9f93e8d808 test: add e2e tests for comments, file tree, actions and branch protection (#40313)
Add e2e tests for flows that had no browser coverage: editing and
quote-replying an issue with an uploaded image, file tree and go-to-file
navigation, the Actions run view and workflow dispatch, and branch
protection rules with their priority.

The tests exposed bugs that are fixed here:

- Quote reply into an empty comment box left the Comment button disabled
- Removing an uploaded attachment did not update the comment buttons
- Going back from a file opened via the file tree to the initially
loaded page kept showing the other file

Assisted-by: Claude Code:claude-opus-5-5
2026-11-12 07:12:55 +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);
});