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:
parent
2ecee0bb0a
commit
fae5d792f4
@ -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);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user