-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add e2e reaction test, improve accessibility, enable parallel testing #37081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
silverwind
merged 12 commits into
go-gitea:main
from
silverwind:e2e-reactions-and-random-string
Apr 3, 2026
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
26f89b6
Add e2e reaction test and `randomString` utility
silverwind 07ecdd8
Add `aria-label` to reaction picker dropdown
silverwind 381493e
Add `aria-label` to reaction buttons and container
silverwind d674f9c
Simplify e2e `randomString` and `generatePassword`
silverwind 636315e
comment
silverwind 4851ff6
Use static test identifiers instead of random strings
silverwind 27a9b12
Revert "Use static test identifiers instead of random strings"
silverwind 23d612a
Reapply "Use static test identifiers instead of random strings"
silverwind 2c4a007
Enable parallel e2e testing with both browsers
silverwind dbfec11
Rename reaction picker aria-label to `Reactions`
silverwind 0bd2dc7
Merge branch 'main' into e2e-reactions-and-random-string
GiteaBot bed5142
Apply suggestion from @silverwind
silverwind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import {env} from 'node:process'; | ||
| import {expect, test} from '@playwright/test'; | ||
| import {login, apiCreateRepo, apiCreateIssue, apiDeleteRepo, randomString} from './utils.ts'; | ||
|
|
||
| test('toggle issue reactions', async ({page, request}) => { | ||
| const repoName = `e2e-reactions-${randomString(8)}`; | ||
| const owner = env.GITEA_TEST_E2E_USER; | ||
| await apiCreateRepo(request, {name: repoName}); | ||
| await Promise.all([ | ||
| apiCreateIssue(request, owner, repoName, {title: 'Reaction test'}), | ||
| login(page), | ||
| ]); | ||
| try { | ||
| await page.goto(`/${owner}/${repoName}/issues/1`); | ||
|
|
||
| const issueComment = page.locator('.timeline-item.comment.first'); | ||
|
|
||
| await issueComment.locator('.select-reaction').click(); | ||
| await issueComment.locator('.select-reaction .item[data-reaction-content="+1"]').click(); | ||
| await expect(issueComment.locator('.bottom-reactions a[role="button"][data-reaction-content="+1"] .reaction-count')).toHaveText('1'); | ||
|
|
||
| await issueComment.locator('.bottom-reactions a[role="button"][data-reaction-content="+1"]').click(); | ||
| await expect(issueComment.locator('.bottom-reactions a[role="button"][data-reaction-content="+1"]')).toHaveCount(0); | ||
| } finally { | ||
| await apiDeleteRepo(request, owner, repoName); | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.