0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-14 00:01:05 +02:00

Rename test var target to userName for clarity

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
silverwind 2026-04-26 21:07:19 +02:00
parent 2ecee0bb0a
commit fae5d792f4
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

View File

@ -3,10 +3,10 @@ import {test, expect} from '@playwright/test';
import {apiCreateRepo, apiCreateUser, login, randomString} from './utils.ts';
test('add collaborator search', async ({page, request}) => {
const target = `rc-${randomString(8)}`;
const userName = `rc-${randomString(8)}`;
const repoName = `rc-${randomString(8)}`;
await apiCreateUser(request, target);
await apiCreateUser(request, userName);
await Promise.all([
apiCreateRepo(request, {name: repoName, autoInit: false}),
login(page),
@ -14,9 +14,9 @@ test('add collaborator search', async ({page, request}) => {
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}/settings/collaboration`);
const input = page.locator('#search-user-box input.prompt');
await input.fill(target.slice(-6));
await input.fill(userName.slice(-6));
const result = page.locator('#search-user-box .results .result').first();
await expect(result).toContainText(target);
await expect(result).toContainText(userName);
await result.click();
await expect(input).toHaveValue(target);
await expect(input).toHaveValue(userName);
});