Files
silverwind de478c4b6f Add e2e tests for server push events (#36879)
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>
2026-03-27 11:49:11 +01:00
..
2026-02-20 16:26:47 -08:00
2026-02-20 16:26:47 -08:00
2026-02-20 16:26:47 -08:00
2026-02-20 16:26:47 -08:00
2026-02-20 16:26:47 -08: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, 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);
});