mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-16 16:57:26 +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';
|
import {apiCreateRepo, apiCreateUser, login, randomString} from './utils.ts';
|
||||||
|
|
||||||
test('add collaborator search', async ({page, request}) => {
|
test('add collaborator search', async ({page, request}) => {
|
||||||
const target = `rc-${randomString(8)}`;
|
const userName = `rc-${randomString(8)}`;
|
||||||
const repoName = `rc-${randomString(8)}`;
|
const repoName = `rc-${randomString(8)}`;
|
||||||
|
|
||||||
await apiCreateUser(request, target);
|
await apiCreateUser(request, userName);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
apiCreateRepo(request, {name: repoName, autoInit: false}),
|
apiCreateRepo(request, {name: repoName, autoInit: false}),
|
||||||
login(page),
|
login(page),
|
||||||
@ -14,9 +14,9 @@ test('add collaborator search', async ({page, request}) => {
|
|||||||
|
|
||||||
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}/settings/collaboration`);
|
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}/settings/collaboration`);
|
||||||
const input = page.locator('#search-user-box input.prompt');
|
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();
|
const result = page.locator('#search-user-box .results .result').first();
|
||||||
await expect(result).toContainText(target);
|
await expect(result).toContainText(userName);
|
||||||
await result.click();
|
await result.click();
|
||||||
await expect(input).toHaveValue(target);
|
await expect(input).toHaveValue(userName);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user