Integrations apps - #1016
Conversation
Bundle Stats — Frontend bundle size changeHey 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
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller |
4f0cbd5 to
272af9d
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands the E2E integration test coverage by adding mock-backed Playwright specs and MSW handlers for many “Apps” integrations, and includes a couple of backend/JSP fixes intended to stabilize integration flows (e.g., Argos Optional DOI serialization, GitHub tree view class handling, archive submission metadata merging).
Changes:
- Add Playwright E2E specs + page objects for multiple integrations (RAiD, Slack, GitHub, Nextcloud/ownCloud, protocols.io, Dryad, DMP providers, Calira, Evernote, DCD, Teams, ORCID).
- Add MSW mock handlers/fixtures and wire them into the E2E mock server and dev/CI startup scripts.
- Backend/JSP tweaks for integration-related serialization/markup and archive deposit metadata.
Reviewed changes
Copilot reviewed 71 out of 72 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/webapp/WEB-INF/pages/connect/github/gitHubTreeView.jsp | Quotes dynamic class attribute in GitHub tree view markup. |
| src/main/webapp/ui/src/modules/slack/tests/slack.e2e.ts | Adds Slack Playwright E2E spec (currently skipped for OAuth flow). |
| src/main/webapp/ui/src/modules/slack/tests/pageObjects/SlackDialogComponent.ts | Adds Slack dialog Playwright page object helpers. |
| src/main/webapp/ui/src/modules/slack/tests/mock.ts | Adds MSW handlers/constants for Slack OAuth + API mocking. |
| src/main/webapp/ui/src/modules/raid/tests/raid.e2e.ts | Adds RAiD Playwright E2E scenarios including export “Report to RAiD”. |
| src/main/webapp/ui/src/modules/raid/tests/mock.ts | Adds MSW handlers + JSON fixtures for RAiD mock API/auth. |
| src/main/webapp/ui/src/modules/raid/tests/fixtures/servicePoint.json | Adds RAiD service-point fixture for mock API. |
| src/main/webapp/ui/src/modules/raid/tests/fixtures/raids.json | Adds RAiD records fixture for mock API. |
| src/main/webapp/ui/src/modules/protocolsio/tests/protocolsio.e2e.ts | Adds protocols.io Playwright E2E import scenario. |
| src/main/webapp/ui/src/modules/protocolsio/tests/pageObjects/ProtocolsIODialogComponent.ts | Adds protocols.io dialog Playwright page object helpers. |
| src/main/webapp/ui/src/modules/protocolsio/tests/mock.ts | Adds MSW handlers/constants for protocols.io OAuth mocking. |
| src/main/webapp/ui/src/modules/owncloud/tests/pageObjects/OwnCloudDialogComponent.ts | Adds ownCloud dialog Playwright page object helpers. |
| src/main/webapp/ui/src/modules/owncloud/tests/owncloud.e2e.ts | Adds ownCloud Playwright E2E insert-file scenario. |
| src/main/webapp/ui/src/modules/owncloud/tests/mock.ts | Adds MSW handlers/constants for ownCloud OAuth + WebDAV mocking. |
| src/main/webapp/ui/src/modules/orcid/tests/pageObjects/OrcidProfilePage.ts | Adds ORCID profile Playwright page object helpers. |
| src/main/webapp/ui/src/modules/orcid/tests/orcid.e2e.ts | Adds ORCID Playwright E2E profile-connect scenario (mocked). |
| src/main/webapp/ui/src/modules/orcid/tests/mock.ts | Adds MSW handler/constants for ORCID token exchange mocking. |
| src/main/webapp/ui/src/modules/nextcloud/tests/pageObjects/NextcloudDialogComponent.ts | Adds Nextcloud dialog Playwright page object helpers. |
| src/main/webapp/ui/src/modules/nextcloud/tests/nextcloud.e2e.ts | Adds Nextcloud Playwright E2E insert-file scenario (real+mock branches). |
| src/main/webapp/ui/src/modules/nextcloud/tests/mock.ts | Adds MSW handlers/constants for Nextcloud OAuth + WebDAV mocking. |
| src/main/webapp/ui/src/modules/msteams/tests/pageObjects/MsTeamsShareDialogComponent.ts | Adds Teams “share” dialog Playwright component. |
| src/main/webapp/ui/src/modules/msteams/tests/msteams.e2e.ts | Adds Teams webhook Playwright E2E share scenario. |
| src/main/webapp/ui/src/modules/msteams/tests/mock.ts | Adds MSW handlers/types for capturing Teams webhook payloads. |
| src/main/webapp/ui/src/modules/github/tests/pageObjects/GitHubDialogComponent.ts | Adds GitHub insert dialog Playwright page object helpers. |
| src/main/webapp/ui/src/modules/github/tests/pageObjects/GitHubAppsCardComponent.ts | Adds GitHub Apps card Playwright page object helpers. |
| src/main/webapp/ui/src/modules/github/tests/mock.ts | Adds MSW handlers/constants for GitHub OAuth + API mocking. |
| src/main/webapp/ui/src/modules/github/tests/github.e2e.ts | Adds GitHub Playwright E2E insert-file scenario. |
| src/main/webapp/ui/src/modules/evernote/tests/pageObjects/EvernoteImportDialog.ts | Adds Evernote import dialog Playwright page object helpers. |
| src/main/webapp/ui/src/modules/evernote/tests/evernote.e2e.ts | Adds Evernote Playwright E2E import scenario using ENEX fixture. |
| src/main/webapp/ui/src/modules/dryad/tests/mock.ts | Adds MSW handlers for Dryad OAuth + deposit mocking. |
| src/main/webapp/ui/src/modules/dryad/tests/dryad.e2e.ts | Adds Dryad Playwright E2E export/deposit scenario. |
| src/main/webapp/ui/src/modules/dmptool/tests/pageObjects/DMPToolImportDialogComponent.ts | Adds DMPTool import dialog Playwright helpers. |
| src/main/webapp/ui/src/modules/dmptool/tests/mock.ts | Adds MSW handlers + fixture wiring for DMPTool plan APIs. |
| src/main/webapp/ui/src/modules/dmptool/tests/fixtures/plans.json | Adds DMPTool plans fixture. |
| src/main/webapp/ui/src/modules/dmptool/tests/dmptool.e2e.ts | Adds DMPTool Playwright E2E gallery import scenario. |
| src/main/webapp/ui/src/modules/dmponline/tests/pageObjects/DMPOnlineImportDialogComponent.ts | Adds DMPonline import dialog Playwright helpers. |
| src/main/webapp/ui/src/modules/dmponline/tests/mock.ts | Adds MSW handlers + fixture wiring for DMPonline plan APIs. |
| src/main/webapp/ui/src/modules/dmponline/tests/fixtures/plans.json | Adds DMPonline plans fixture. |
| src/main/webapp/ui/src/modules/dmponline/tests/dmponline.e2e.ts | Adds DMPonline Playwright E2E gallery import scenario. |
| src/main/webapp/ui/src/modules/dmpassistant/tests/pageObjects/DMPAssistantImportDialogComponent.ts | Adds DMP Assistant import dialog Playwright helpers. |
| src/main/webapp/ui/src/modules/dmpassistant/tests/mock.ts | Adds MSW handlers + fixture wiring for DMP Assistant plan APIs. |
| src/main/webapp/ui/src/modules/dmpassistant/tests/fixtures/plans.json | Adds DMP Assistant plans fixture. |
| src/main/webapp/ui/src/modules/dmpassistant/tests/dmpassistant.e2e.ts | Adds DMP Assistant Playwright E2E gallery import scenario. |
| src/main/webapp/ui/src/modules/dcd/tests/mock.ts | Adds MSW handlers/constants for Digital Commons Data flow mocking. |
| src/main/webapp/ui/src/modules/dcd/tests/dcd.e2e.ts | Adds DCD Playwright E2E export/deposit scenario. |
| src/main/webapp/ui/src/modules/calira/tests/pageObjects/CaliraDialogComponent.ts | Adds Calira insert dialog Playwright helpers. |
| src/main/webapp/ui/src/modules/calira/tests/mock.ts | Adds MSW handlers/constants for Calira OAuth + API mocking. |
| src/main/webapp/ui/src/modules/calira/tests/calira.e2e.ts | Adds Calira Playwright E2E insert-booking scenario. |
| src/main/webapp/ui/src/modules/argos/tests/pageObjects/ArgosImportDialogComponent.ts | Adds Argos import dialog Playwright helpers. |
| src/main/webapp/ui/src/modules/argos/tests/mock.ts | Adds MSW handlers/constants for Argos API mocking. |
| src/main/webapp/ui/src/modules/argos/tests/argos.e2e.ts | Adds Argos Playwright E2E gallery import scenario. |
| src/main/webapp/ui/src/tests/e2e/pageObjects/workspace/WorkspacePage.ts | Wires Evernote import dialog into Workspace page object. |
| src/main/webapp/ui/src/tests/e2e/pageObjects/system/SystemConfigPage.ts | Adds helper to set multiple system settings in tests. |
| src/main/webapp/ui/src/tests/e2e/pageObjects/groups/GroupViewPage.ts | Adds group view page object used by RAiD E2E scenario. |
| src/main/webapp/ui/src/tests/e2e/pageObjects/gallery/GalleryPage.ts | Adds gallery “create/import” flows for multiple DMP providers and Argos. |
| src/main/webapp/ui/src/tests/e2e/pageObjects/document/DocumentEditorPage.ts | Wires multiple integration dialogs into the document editor page object. |
| src/main/webapp/ui/src/tests/e2e/pageObjects/apps/AppsPage.ts | Adds helper flows for enabling apps via OAuth/webhook and RAiD multi-server. |
| src/main/webapp/ui/src/tests/e2e/mockServer.ts | Registers new MSW handlers in the E2E mock server. |
| src/main/webapp/ui/src/tests/e2e/fixtures/ui.ts | Exposes new page objects/components as Playwright fixtures. |
| src/main/webapp/ui/src/tests/e2e/fixtures/dynamicUser.ts | Exports helper types/functions and returns context for teardown use. |
| src/main/webapp/ui/src/tests/e2e/env.ts | Adds env keys for Calira + Nextcloud real-mode credentials. |
| src/main/webapp/ui/src/tests/e2e/components/shared/ExportWizardComponent.ts | Adds wizard helpers for Report-to-RAiD and repository metadata inputs. |
| src/main/webapp/ui/src/tests/e2e/components/groups/GroupRaidConnectionsComponent.ts | Adds RAiD connections UI component helper for group view. |
| src/main/webapp/ui/src/tests/e2e/api/models/sysadmin.ts | Extends sysadmin group create request type to include PROJECT_GROUP. |
| src/main/webapp/ui/src/tests/e2e/api/clients/SysadminClient.ts | Adds mutation guard before creating sysadmin groups. |
| src/main/webapp/ui/.env.example | Adds Calira/Nextcloud env vars for E2E real-mode configuration. |
| src/main/java/com/researchspace/webapp/integrations/argos/ArgosDMPProvider.java | Uses a shared ObjectMapper with Jdk8Module for Optional DOI serialization. |
| src/main/java/com/researchspace/service/impl/AsyncDepositorImpl.java | Adjusts archive submission metadata handling around otherProperties. |
| docker/dev/entrypoint-app.sh | Adds JVM integration config for expanded E2E mock coverage. |
| docker/dev/docker-compose.yml | Provides RSPACE_BASE_URL for the E2E mock server redirect behavior. |
| .github/workflows/e2e.yml | Wires new mock/real integration args and secrets into CI E2E workflow. |
Suppressed comments (2)
src/main/webapp/ui/src/modules/owncloud/tests/mock.ts:69
- Same wildcard path issue here: "/owncloud/remote.php/webdav*" is unlikely to match the actual WebDAV endpoint paths, so the mock will not intercept PROPFIND/GET calls.
src/main/webapp/ui/src/modules/nextcloud/tests/mock.ts:69 - Same issue as above: the handler path includes a literal
*and is unlikely to intercept WebDAV calls. Use a RegExp (or a path-to-regexp parameter) to match the full WebDAV subtree.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Skipped: connect/connected.jsp double-escapes data-response (c:out around | ||
| // an already-escaped EL expression), which corrupts Slack's JSON OAuth | ||
| // payload and breaks the frontend's JSON.parse. | ||
| test.skip("As a user, I can connect a Slack channel via OAuth", async ({ componentToasts, componentSlackDialog }) => { |
There was a problem hiding this comment.
fix reverted, and test skipped
| http.options( | ||
| "/owncloud/remote.php/webdav*", |
There was a problem hiding this comment.
MSW converts the trailing * to (.*), so this correctly matches /webdav/... paths.
| String json = OBJECT_MAPPER.writeValueAsString(dmpDetails); | ||
| InputStream is = new ByteArrayInputStream(json.getBytes()); | ||
| EcatDocumentFile file = |
Adds RSPACE_BASE_URL for mock cross-origin redirects, CALIRA/NEXTCLOUD creds, and shared page objects/fixtures/env helpers used by the new per-app e2e mock+real test suites.
…app mocks and wevdav hardening
b4dadfd to
a191c1f
Compare
tchoi-rs
left a comment
There was a problem hiding this comment.
All good, some small issues:
| componentNotifications, | ||
| componentToasts, | ||
| }) => { | ||
| await page.route("https://api.crossref.org/funders**", (route) => |
There was a problem hiding this comment.
If it's possible to test for the exact ID, it should test for that
| const radio = this.popup.getByRole("radio").first(); | ||
| const row = this.popup.getByRole("listitem").filter({ has: radio }).first(); | ||
| const fullText = await row.innerText(); | ||
| const name = fullText.split(/\r?\nUpdated\b/)[0].trim(); |
| const popup = await docEditor.openDropboxPicker(); | ||
| await popup.waitForLoadState(); | ||
|
|
||
| // const flow = new DropboxPickerFlow(popup); |
| ), | ||
|
|
||
| http.options( | ||
| "/nextcloud/remote.php/webdav*", |
There was a problem hiding this comment.
If possible, match for exact call paths
| const popup = await docEditor.openOneDrivePicker(); | ||
| await popup.waitForLoadState(); | ||
|
|
||
| // const flow = new OneDrivePickerFlow(popup); |
| await pageApps.setEnabled("Slack", true); | ||
| }); | ||
|
|
||
| // Skipped: connect/connected.jsp double-escapes data-response (c:out around |
There was a problem hiding this comment.
Is this comment still correct?
| }); | ||
|
|
||
| test("As a user, I can import a protocol into a document field", async ({ page, pageWorkspace }) => { | ||
| await page.route(/^https:\/\/www\.protocols\.io\/api\/v3\/protocols\?/, (route) => |
There was a problem hiding this comment.
This should not need regex
| await page.route(/^https:\/\/www\.protocols\.io\/api\/v3\/protocols\?/, (route) => | ||
| route.fulfill({ json: MOCK_PROTOCOLS_IO_SEARCH_RESPONSE }), | ||
| ); | ||
| await page.route(/^https:\/\/www\.protocols\.io\/api\/v3\/protocols\/\d+$/, (route) => |
There was a problem hiding this comment.
This should not need regex
| ), | ||
|
|
||
| http.options( | ||
| "/owncloud/remote.php/webdav*", |
| }, | ||
| }), | ||
| ), | ||
| http.all("/owncloud/remote.php/webdav*", ({ request }) => { |
Description
most of the integration apps are now mocked
minor fixes
AsyncDepositorImpl.java
Avoid clearing otherProperties before merging RAID and ICSN identifiers,
which was removing properties populated from the archive configuration.
ArgosDMPProvider.java
Register Jdk8Module with a shared ObjectMapper so Optional DOI
values are serialized correctly.
gitHubTreeView.jsp
Quote the dynamic class expression so values containing spaces, such as
"directory collapsed", are treated as a single class attribute.
Testing notes
OPTIONAL