Files
gitea/tests/e2e
Hello-Liarandsilverwind 257c34e003 fix(repo): use the viewed ref's editorconfig in file view, blame and editor (#39973)
The file view, blame and web editor read `.editorconfig` from the
default branch, so branch-specific settings like tab width were ignored.
The file view's middleware ran before the ref was resolved, and blame
never loaded it.

- `GetEditorconfig` reads the current commit, falling back to the
default branch only where no ref is resolved
- `Home` and `RefBlame` load the editorconfig after ref resolution

Fixes: https://github.com/go-gitea/gitea/issues/27413
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
2026-10-25 21:41:06 +00:00
..
2026-02-20 16:26:47 -08: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);
});