Skip to content

test(e2e) migrate sysadmin tests - #1072

Open
nebay-abraha wants to merge 4 commits into
mainfrom
sysadmin-e2e-migr
Open

test(e2e) migrate sysadmin tests#1072
nebay-abraha wants to merge 4 commits into
mainfrom
sysadmin-e2e-migr

Conversation

@nebay-abraha

@nebay-abraha nebay-abraha commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

  • migrates and expands playwright e2e coverage for system admin flows, expanded page objects/fixtures, centralized dynamic user creation

Testing notes

  • make sure mock and real tests are passing on ci

@nebay-abraha
nebay-abraha requested a review from tchoi-rs as a code owner August 27, 2026 22:42
@nebay-abraha
nebay-abraha marked this pull request as draft August 27, 2026 22:42
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bundle Stats — Frontend bundle size change

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
548 30.87 MB
11.3 MB
0%
Changeset
File Δ Size
Inputs/UnitSelect.tsx 🆕 +511 B 0 B → 511 B
RouterNavigationProvider.tsx 🆕 +175 B 0 B → 175 B
lib/ReactPropTypesSecret.js 🆕 +73 B 0 B → 73 B
CustomField.tsx 📈 +1.7 kB (+161.13%) 1.05 kB → 2.75 kB
state.js 📈 +1.24 kB (+64.62%) 1.92 kB → 3.16 kB
NewField.tsx 📉 -154 B (-26.46%) 582 B → 428 B
index.js 📉 -419 B (-92.90%) 451 B → 32 B
state/state.js 🔥 -3.16 kB (-100%) 3.16 kB → 0 B
UnitSelect.tsx 🔥 -511 B (-100%) 511 B → 0 B
components/RouterNavigationProvider.tsx 🔥 -175 B (-100%) 175 B → 0 B
ReactPropTypesSecret.js 🔥 -73 B (-100%) 73 B → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates and expands Playwright E2E coverage for sysadmin/system flows by introducing a new “system” spec suite, new/updated page objects, and shared test utilities/fixtures (notably centralized dynamic-user creation and additional flow fixtures).

Changes:

  • Added a new set of tags.SYSTEM E2E specs covering sysadmin user listing/actions, operate-as, account creation/batch upload, communities, and group management scenarios.
  • Introduced/extended E2E page objects and dialog components to support the migrated system flows (users grid, groups, communities, forms, messages, document sign/witness, etc.).
  • Centralized dynamic user creation and constants (e.g., DYNAMIC_USER_PASSWORD) and expanded flows fixtures to provide higher-level actors/sessions.

Reviewed changes

Copilot reviewed 63 out of 64 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/main/webapp/ui/src/modules/raid/tests/raid.e2e.ts Switches dynamic-user helper import to shared createDynamicUser.
src/main/webapp/ui/src/tests/e2e/testData.ts Adds shared DYNAMIC_USER_PASSWORD constant.
src/main/webapp/ui/src/tests/e2e/tags.ts Adds SYSTEM tag for system-level E2E specs.
src/main/webapp/ui/src/tests/e2e/specs/system/users/systemUserListings.e2e.ts New sysadmin Users grid sorting/search/paging/tagging/unlock coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/users/sysadminAccessAndRole.e2e.ts New sysadmin access/role scenarios (last login, create/delete sysadmin, read-only docs, CSV export, etc.).
src/main/webapp/ui/src/tests/e2e/specs/system/operate-as/sysadminOperatesAs.e2e.ts New Operate As coverage (happy path, rejection paths, CA restrictions, password reset).
src/main/webapp/ui/src/tests/e2e/specs/system/groups/projectGroups.e2e.ts New project group creation/self-service coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupSharedFolder.e2e.ts New lab group shared folder move scenarios.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupRoleManagement.e2e.ts New lab group role/visibility management scenarios.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupProfileSettings.e2e.ts New lab group profile-setting toggle coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupPiTransfer.e2e.ts New lab group PI transfer negative-path coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupPiRoleGrant.e2e.ts New PI role grant/revoke scenarios.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupDocumentWitnessing.e2e.ts New sign/witness end-to-end coverage with audit assertions.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupCrossMembership.e2e.ts New cross-membership shared-folder/search coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/labGroupCreation.e2e.ts New lab group creation/rename/self-service delete coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/groups/collaborationGroup.e2e.ts New collaboration-group creation/invite/rename/leave coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/communities/community.e2e.ts New communities create/rename/move group/delete coverage.
src/main/webapp/ui/src/tests/e2e/specs/system/accounts/userDeletionTemplateTransfer.e2e.ts New deletion+template transfer coverage (including gallery transfer).
src/main/webapp/ui/src/tests/e2e/specs/system/accounts/systemBatchUpload.e2e.ts New batch user registration scenarios (CSV/manual/upload).
src/main/webapp/ui/src/tests/e2e/specs/system/accounts/systemAccountCreation.e2e.ts New create-account UI scenarios (user/pi/admin/sysadmin/restrictions).
src/main/webapp/ui/src/tests/e2e/specs/system/accounts/fixtures/batchCsvFixture.ts New helper to write a temporary CSV fixture to disk.
src/main/webapp/ui/src/tests/e2e/specs/gallery/galleryLinkedDocuments.e2e.ts Skips WebKit due to known upload issue.
src/main/webapp/ui/src/tests/e2e/pageObjects/workspace/WorkspacePage.ts Adds operate-as helpers, message helpers, document open helpers, shared-template creation.
src/main/webapp/ui/src/tests/e2e/pageObjects/system/users/SystemUsersPage.ts New sysadmin Users grid page object (search/sort/export/actions/tagging/unlock).
src/main/webapp/ui/src/tests/e2e/pageObjects/system/groups/SelfServiceLabGroupPage.ts New PI self-service lab group page object.
src/main/webapp/ui/src/tests/e2e/pageObjects/system/groups/ProjectGroupPage.ts New self-service project group page object.
src/main/webapp/ui/src/tests/e2e/pageObjects/system/groups/GroupDetailsPage.ts New group details/membership page object (rename/change PI/invite/remove/etc.).
src/main/webapp/ui/src/tests/e2e/pageObjects/system/groups/GroupAdminPage.ts New group admin create/edit page object + user picker integration.
src/main/webapp/ui/src/tests/e2e/pageObjects/system/groups/DirectoryPage.ts New directory helper to locate group IDs from directory.
src/main/webapp/ui/src/tests/e2e/pageObjects/system/communities/CommunityCreationPage.ts New create-community page object.
src/main/webapp/ui/src/tests/e2e/pageObjects/system/communities/CommunityAdminPage.ts New community admin page object (rename/add group/etc.).
src/main/webapp/ui/src/tests/e2e/pageObjects/system/communities/CommunitiesPage.ts New communities list page object (create/open/remove/delete).
src/main/webapp/ui/src/tests/e2e/pageObjects/system/accounts/CreateAccountPage.ts New create-account page object used by system specs.
src/main/webapp/ui/src/tests/e2e/pageObjects/notebook/NotebookPage.ts Adds toast/sharing alert helpers.
src/main/webapp/ui/src/tests/e2e/pageObjects/myrspace/UserProfilePage.ts New profile page object (change password dialog entry).
src/main/webapp/ui/src/tests/e2e/pageObjects/myrspace/MyRSpacePage.ts Adds navigation to create/manage forms pages.
src/main/webapp/ui/src/tests/e2e/pageObjects/myrspace/ManageFormsPage.ts New manage-forms page object + publish/menu actions.
src/main/webapp/ui/src/tests/e2e/pageObjects/myrspace/CreateFormPage.ts New create-form page object + add-field/rename/save&close flows.
src/main/webapp/ui/src/tests/e2e/pageObjects/document/DocumentPage.ts Adds reload/id helpers and sign/witness dialog flows.
src/main/webapp/ui/src/tests/e2e/fixtures/flows.ts Expands flow fixtures for sysadmin, self-service PI, and generic user sessions.
src/main/webapp/ui/src/tests/e2e/fixtures/dynamicUser.ts Refactors dynamic user fixture to use shared createDynamicUser and shared password constant.
src/main/webapp/ui/src/tests/e2e/createDynamicUser.ts New shared dynamic-user creator for sysadmin API tests/specs.
src/main/webapp/ui/src/tests/e2e/components/workspace/WorkspaceTemplatePickerDialog.ts Adds “Shared With Me” tab switch helper.
src/main/webapp/ui/src/tests/e2e/components/system/users/TagUsersDialogComponent.ts New Add/Remove Tags dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/users/GrantRevokePiRoleDialogComponent.ts New grant/revoke PI role dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/operate-as/OperateAsDialogComponent.ts New operate-as dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/groups/UserPickerComponent.ts New dual-column user picker component helper.
src/main/webapp/ui/src/tests/e2e/components/system/groups/SendMessageDialogComponent.ts New “Send a Message” dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/groups/RenameGroupDialogComponent.ts New rename-group dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/groups/InviteMembersDialogComponent.ts New invite-members dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/groups/GroupInvitationBanner.ts New group invitation banner helper.
src/main/webapp/ui/src/tests/e2e/components/system/groups/GroupHeaderComponent.ts New group header helper (Change Group flow).
src/main/webapp/ui/src/tests/e2e/components/system/groups/ChangeRoleDialogComponent.ts New change-role dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/groups/ChangePiDialogComponent.ts New change-PI dialog component.
src/main/webapp/ui/src/tests/e2e/components/system/AppriseAlertComponent.ts New legacy “apprise” alert wrapper component.
src/main/webapp/ui/src/tests/e2e/components/system/accounts/BatchUserRegistrationComponent.ts New batch registration component wrapper (CSV/manual/upload flows).
src/main/webapp/ui/src/tests/e2e/components/shared/MessagesAndRequestsDialogComponent.ts New messages/requests dialog wrapper (accept + open linked record).
src/main/webapp/ui/src/tests/e2e/components/myrspace/PublishShareDialogComponent.ts New publish/share dialog wrapper for forms.
src/main/webapp/ui/src/tests/e2e/components/myrspace/FieldEditorDialogComponent.ts New field editor dialog wrapper for forms.
src/main/webapp/ui/src/tests/e2e/components/myrspace/ChangePasswordDialogComponent.ts New change password dialog wrapper.
src/main/webapp/ui/src/tests/e2e/components/document/WitnessDocumentDialogComponent.ts New witness dialog wrapper.
src/main/webapp/ui/src/tests/e2e/components/document/SignDocumentDialogComponent.ts New sign dialog wrapper (witness selection + proceed).
src/main/webapp/ui/src/tests/e2e/components/document/DocumentViewToolbar.ts Adds witness button locator to toolbar wrapper.
Suppressed comments (1)

src/main/webapp/ui/src/tests/e2e/pageObjects/workspace/WorkspacePage.ts:147

  • openMessageLinkedDocument returns a DocumentPage without waiting for the document view to load; this can cause race conditions when the next step asserts on the document UI.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +119 to +123
async openDocument(id: number): Promise<DocumentPage> {
await this.page.goto(`/workspace/editor/structuredDocument/${id}`);
await this.page.waitForURL("**/workspace/editor/structuredDocument/**");
return new DocumentPage(this.page);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed: call await document.isLoaded()

Comment on lines +48 to +62
get piCommunityRadio(): Locator {
return this.page.getByRole("radio");
}

get noneCommunityRadio(): Locator {
return this.page.getByRole("radio").nth(0);
}

get allGroupsCommunityRadio(): Locator {
return this.page.getByRole("radio").nth(1);
}

get communitySelectionCell(): Locator {
return this.page.getByRole("cell").filter({ has: this.noneCommunityRadio });
}

@nebay-abraha nebay-abraha Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed: now scoped to this.page.locator("#communitiesList:visible").getByRole("radio")

Comment on lines +166 to +175
private async sortColumn(columnHeader: string, menuItemName: "Sort by ASC" | "Sort by DESC"): Promise<void> {
const firstRow = this.dataRows().first();
const before = await firstRow.innerText();
await this.page.getByRole("button", { name: `${columnHeader} column menu`, exact: true }).click();
await this.page
.getByRole("menu", { name: `${columnHeader} column menu` })
.getByRole("menuitem", { name: menuItemName, exact: true })
.click();
await expect(firstRow).not.toHaveText(before);
}

@nebay-abraha nebay-abraha Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed: now waits on /system/ajax/jsonList response

@nebay-abraha
nebay-abraha marked this pull request as ready for review August 29, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants