Add e2e reaction test, improve accessibility, enable parallel testing#37081
Conversation
Add a new e2e test for toggling issue reactions via the reaction picker dropdown. Extract `randomString` utility to replace ad-hoc `Date.now()` and `Math.random()` ID generation across all e2e tests, fixing potential name collisions when tests run in parallel workers. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Improves accessibility by adding an `aria-label` to the reaction picker dropdown, making it identifiable by screen readers and semantic test selectors. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Add `role="group"` with `aria-label="Reactions"` to the reactions container and include the reaction key in each button's aria-label. Update the e2e test to use semantic selectors. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Replace crypto-based hex generation with simple alphanumeric character selection, and reuse `randomString` in `generatePassword`. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Replace randomString calls with deterministic names derived from the test name. Remove randomString, generatePassword, and unused clickDropdownItem from e2e utils. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
randomString utilityThis reverts commit 4851ff6.
This reverts commit 27a9b12.
Enable fullyParallel and run chromium+firefox simultaneously. Add randomString suffixes to all test identifiers for concurrency safety. Parallelize login and API setup where possible. Use dedicated user in user-settings test to avoid admin state races. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
|
Now using Total |
| @@ -1,5 +1,5 @@ | |||
| {{if ctx.RootData.IsSigned}} | |||
| <div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}"> | |||
| <div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}" aria-label="{{ctx.Locale.Tr "repo.add_reaction"}}"> | |||
There was a problem hiding this comment.
Written by AI? Why here is "Add reaction" but not "Reactions"?
There was a problem hiding this comment.
Changing to aria-label="Reactions" duplicates that label on the page making semantic selector unusable and my prompt was for semantic selectors only in that test, so I have to turn on of them non-semantic.
There was a problem hiding this comment.
With dbfec11, the button selector uses .select-reaction class, best we can do without introducing a different translation. Will be fixed later.
Use the existing "repo.reactions" translation for the reaction picker dropdown, removing the now-unused "repo.add_reaction" key. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Signed-off-by: silverwind <me@silverwind.io>
* main: Update `setup-uv` to v8.0.0 (go-gitea#37101) Fix various bugs (go-gitea#37096) Clean up AppURL, remove legacy origin-url webcomponent (go-gitea#37090) Add e2e reaction test, improve accessibility, enable parallel testing (go-gitea#37081) Fix various legacy problems (go-gitea#37092)

Add a new e2e test for toggling issue reactions via the reaction picker dropdown.
Add
aria-labelattributes to improve reaction accessibility:aria-label="Add reaction"to the reaction picker dropdownrole="group"witharia-label="Reactions"to the reactions container, giving it a semantic identity for screen readersaria-label(e.g.+1: user1, user2) so screen readers announce which reaction a button representsE2e test improvements:
randomStringto useMath.randominstead ofnode:cryptogeneratePasswordwith a static password, remove unusedclickDropdownItemfullyParallel: trueandworkers: '50%'in Playwright configloginandapiCreateReposetup where possibleuser-settingstest for concurrency safetyThis PR was written with the help of Claude Opus 4.6