mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-05 14:48:07 +00:00
Add a new e2e test for toggling issue reactions via the reaction picker dropdown. Add `aria-label` attributes to improve reaction accessibility: - Add `aria-label="Reaction"` to the reaction picker dropdown - Add `role="group"` with `aria-label="Reactions"` to the reactions container, giving it a semantic identity for screen readers - Include the reaction key in each reaction button's `aria-label` (e.g. `+1: user1, user2`) so screen readers announce which reaction a button represents E2e test improvements: - Simplify `randomString` to use `Math.random` instead of `node:crypto` - Replace `generatePassword` with a static password, remove unused `clickDropdownItem` - Enable `fullyParallel: true` and `workers: '50%'` in Playwright config - Run both chromium and firefox in all environments (not just CI) - Parallelize `login` and `apiCreateRepo` setup where possible - Use dedicated test user in `user-settings` test for concurrency safety Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
41 lines
903 B
TypeScript
41 lines
903 B
TypeScript
import {env} from 'node:process';
|
|
import {defineConfig, devices} from '@playwright/test';
|
|
|
|
const timeoutFactor = Number(env.GITEA_TEST_E2E_TIMEOUT_FACTOR) || 1;
|
|
const timeout = 5000 * timeoutFactor;
|
|
|
|
export default defineConfig({
|
|
workers: '50%',
|
|
fullyParallel: true,
|
|
testDir: './tests/e2e/',
|
|
outputDir: './tests/e2e-output/',
|
|
testMatch: /.*\.test\.ts/,
|
|
forbidOnly: Boolean(env.CI),
|
|
reporter: 'list',
|
|
timeout: 2 * timeout,
|
|
expect: {
|
|
timeout,
|
|
},
|
|
use: {
|
|
baseURL: env.GITEA_TEST_E2E_URL?.replace?.(/\/$/, ''),
|
|
locale: 'en-US',
|
|
actionTimeout: timeout,
|
|
navigationTimeout: 2 * timeout,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
permissions: ['clipboard-read', 'clipboard-write'],
|
|
},
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: {
|
|
...devices['Desktop Firefox'],
|
|
},
|
|
},
|
|
],
|
|
});
|