mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-28 19:32:09 +00:00
Add e2e tests for the three server push features: - **Notification count**: verifies badge appears when another user creates an issue - **Stopwatch**: verifies stopwatch element is rendered when a stopwatch is active - **Logout propagation**: verifies logout in one tab triggers redirect in another Tests are transport-agnostic in preparation for a future WebSocket migration. --------- Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {apiCreateRepo, apiDeleteRepo} from './utils.ts';
test('repo readme', async ({page}) => {
const repoName = `e2e-readme-${Date.now()}`;
await apiCreateRepo(page.request, {name: repoName});
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}`);
await expect(page.locator('#readme')).toContainText(repoName);
await apiDeleteRepo(page.request, env.GITEA_TEST_E2E_USER, repoName);
});