test(FR-2209): add E2E coverage and finalize i18n for project admin#6658
test(FR-2209): add E2E coverage and finalize i18n for project admin#6658yomybaby wants to merge 1 commit intographite-base/6658from
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Adds missing i18n strings and introduces a new Playwright E2E spec to cover the “Project Admin” experience (menu visibility, navigation to admin-scoped pages, members page, and ProjectSelect badge).
Changes:
- Add
projectMembers.*andprojectSelect.ProjectAdminBadgetranslations across multiple locales. - Add
webui.menu.ProjectMemberstranslation across multiple locales. - Add
e2e/project-admin/project-admin.spec.tscovering core FR-2209 project-admin flows (with severaltest.fixmeplaceholders for stacked PR dependencies).
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/i18n/zh-TW.json | Add Traditional Chinese strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/zh-CN.json | Add Simplified Chinese strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/vi.json | Add Vietnamese strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/tr.json | Add Turkish strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/th.json | Add Thai strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/ru.json | Add Russian strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/pt.json | Add Portuguese strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/pt-BR.json | Add Brazilian Portuguese strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/pl.json | Add Polish strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/ms.json | Add Malay strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/mn.json | Add Mongolian strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/ja.json | Add Japanese strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/it.json | Add Italian strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/id.json | Add Indonesian strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/fr.json | Add French strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/fi.json | Add Finnish strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/es.json | Add Spanish strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/el.json | Add Greek strings for Project Members UI + Project Admin badge + menu entry. |
| resources/i18n/de.json | Add German strings for Project Members UI + Project Admin badge + menu entry. |
| e2e/project-admin/project-admin.spec.ts | New E2E coverage for project-admin menu visibility, key admin routes, members page read-only behavior, and ProjectSelect badge. |
| * Resolved from env (`E2E_PROJECT_ADMIN_EMAIL` / `E2E_PROJECT_ADMIN_PASSWORD`); | ||
| * falls back to the local `project-admin-for-default@lablup.com` account | ||
| * documented in the FR-2209 verification notes. That user is the project | ||
| * admin of the `default` project on the test cluster. | ||
| */ | ||
| const projectAdmin = { | ||
| email: | ||
| process.env.E2E_PROJECT_ADMIN_EMAIL || | ||
| 'project-admin-for-default@lablup.com', | ||
| password: process.env.E2E_PROJECT_ADMIN_PASSWORD || 'CWR0y4s5E9p#', |
There was a problem hiding this comment.
The test file hard-codes a non-trivial password fallback. Even for E2E accounts, committing real-looking credentials is a security risk and makes it easy to accidentally reuse in non-test environments. Prefer requiring E2E_PROJECT_ADMIN_PASSWORD (fail fast with a clear error if missing) or using a well-known seeded dev password documented in setup instructions, rather than embedding it in source control.
| * Resolved from env (`E2E_PROJECT_ADMIN_EMAIL` / `E2E_PROJECT_ADMIN_PASSWORD`); | |
| * falls back to the local `project-admin-for-default@lablup.com` account | |
| * documented in the FR-2209 verification notes. That user is the project | |
| * admin of the `default` project on the test cluster. | |
| */ | |
| const projectAdmin = { | |
| email: | |
| process.env.E2E_PROJECT_ADMIN_EMAIL || | |
| 'project-admin-for-default@lablup.com', | |
| password: process.env.E2E_PROJECT_ADMIN_PASSWORD || 'CWR0y4s5E9p#', | |
| * The email may fall back to the documented local test account, but the | |
| * password must be provided explicitly via `E2E_PROJECT_ADMIN_PASSWORD` to | |
| * avoid committing reusable credentials to source control. | |
| */ | |
| const projectAdminPassword = process.env.E2E_PROJECT_ADMIN_PASSWORD; | |
| if (!projectAdminPassword) { | |
| throw new Error( | |
| 'Missing required environment variable: E2E_PROJECT_ADMIN_PASSWORD', | |
| ); | |
| } | |
| const projectAdmin = { | |
| email: | |
| process.env.E2E_PROJECT_ADMIN_EMAIL || | |
| 'project-admin-for-default@lablup.com', | |
| password: projectAdminPassword, |
| /** | ||
| * Credentials for the dedicated project-admin test account. | ||
| * | ||
| * Resolved from env (`E2E_PROJECT_ADMIN_EMAIL` / `E2E_PROJECT_ADMIN_PASSWORD`); | ||
| * falls back to the local `project-admin-for-default@lablup.com` account | ||
| * documented in the FR-2209 verification notes. That user is the project | ||
| * admin of the `default` project on the test cluster. | ||
| */ | ||
| const projectAdmin = { | ||
| email: | ||
| process.env.E2E_PROJECT_ADMIN_EMAIL || | ||
| 'project-admin-for-default@lablup.com', | ||
| password: process.env.E2E_PROJECT_ADMIN_PASSWORD || 'CWR0y4s5E9p#', | ||
| }; | ||
|
|
||
| const DEFAULT_PROJECT_NAME = 'default'; | ||
|
|
||
| async function loginAsProjectAdmin( | ||
| page: Page, | ||
| request: Parameters<typeof loginAsCreatedAccount>[1], | ||
| ): Promise<void> { | ||
| await loginAsCreatedAccount( | ||
| page, | ||
| request, | ||
| projectAdmin.email, | ||
| projectAdmin.password, | ||
| ); | ||
| } |
There was a problem hiding this comment.
This introduces new project-admin-specific credentials/env vars (E2E_PROJECT_ADMIN_EMAIL/E2E_PROJECT_ADMIN_PASSWORD) but they aren’t centralized alongside the other E2E accounts in e2e/utils/test-util.ts (userInfo) or documented in the E2E setup docs. Consider adding a userInfo.projectAdmin entry and documenting the required env vars so contributors/CI can run these tests consistently.
| // spec: .specs/FR-2209-project-admin-management/spec.md | ||
| // Stories 1-4 (admin scope + members page) plus ProjectSelect badge. | ||
| // Full validation requires sibling stack PRs (#6652 serving, #6654 vfolder, | ||
| // #6655 sessions, and #6656 header switch confirm) to be merged — tests | ||
| // that exercise features exclusively on those branches are marked with | ||
| // `test.fixme` with an explanatory comment. |
There was a problem hiding this comment.
A new E2E spec file is added under e2e/project-admin/, but the repo’s e2e/E2E_COVERAGE_REPORT.md does not appear to include the new Project Admin routes/tests. Please update the coverage report (summary row(s), detailed feature tables, and the "Last Updated" date) to reflect the added coverage and any intentionally skipped (test.fixme) scenarios.
09f6dd1 to
abdce81
Compare
3304519 to
1308a03
Compare

Resolves #6650 (FR-2558)
Part of FR-2209 Project Admin Management stack (PR-3 / final).
Stacks on #6657.
Summary
Tests added (
e2e/project-admin/project-admin.spec.ts)Executable on this branch:
Deferred as
test.fixmewith an explanatory comment (depend on sibling branches not yet merged to main):i18n propagation
Propagated these keys from
en.json+ko.json(already added on PR-0..PR-2d) into the remaining 19 language files (de, el, es, fi, fr, id, it, ja, mn, ms, pl, pt-BR, pt, ru, th, tr, vi, zh-CN, zh-TW):projectMembers.Email,projectMembers.Name,projectMembers.PageTitle,projectMembers.Role,projectMembers.RoleAdmin,projectMembers.RoleMemberprojectSelect.ProjectAdminBadgewebui.menu.ProjectMembersEach file only gained a 12-line insertion block; existing key order, formatting, and whitespace are preserved (string-anchored insertion rather than JSON round-trip, so nothing unrelated was re-sorted).
Note: The
header.SwitchOutOfAdminConfirm*keys live on sibling branch #6656 and will be translated there.Notes
test.fixmeassertions target features exclusively on those branches.http://10.122.10.215:8090withproject-admin-for-default@lablup.com. That cluster is currently serving production 26.4.1 without the FR-2209 stack deployed yet, so features under test (admin-members page, admin-mode sider for project-admins, ProjectAdminBadge) are not yet present there — expected failures will resolve once the stack lands. The non-gated tests (admin-serving/admin-data page navigation) passed; the Start/Session/Members/Badge scenarios will pass after deployment.Verification
bash scripts/verify.sh→=== ALL PASS ===(Relay, Lint, Format, TypeScript)test.fixmeentries waiting on sibling PRs)