Skip to content

React UI: API base path centralization + Playwright E2E (smoke) and CI workflow#382

Closed
devin-ai-integration[bot] wants to merge 10 commits intofeature/fix-react-ui-api-pathsfrom
devin/1755216335-resume-react-ui-playwright
Closed

React UI: API base path centralization + Playwright E2E (smoke) and CI workflow#382
devin-ai-integration[bot] wants to merge 10 commits intofeature/fix-react-ui-api-pathsfrom
devin/1755216335-resume-react-ui-playwright

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Aug 15, 2025

React UI: API base path centralization + Playwright E2E (smoke) and CI workflow

Link to Devin run: https://app.devin.ai/sessions/a31450af5b594e0b911e42d2a25024e7
Requested by: Akinori Ishii (@yumioka)

Summary

  • Centralized API base path configuration in the React UI (core/src/main/webapp/ui) to remove hardcoded /core/rest and /core/browser occurrences and use env-driven values.
  • Introduced Playwright with a minimal smoke test and CI workflow for E2E.
  • Ensured Vite dev proxy target is configurable via VITE_PROXY_TARGET.

Key changes

  • New: src/config.ts
    • API_BASE = import.meta.env.VITE_API_BASE ?? '/core'
    • REST_BASE = ${API_BASE}/rest
    • BROWSER_BASE = ${API_BASE}/browser
  • Services updated to use centralized paths:
    • src/services/action.ts -> REST_BASE
    • src/services/saml.ts -> ${REST_BASE}/repo/...
    • src/services/oidc.ts -> ${REST_BASE}/repo/...
    • src/services/cmis.ts -> BROWSER_BASE/REST_BASE where needed; repository list via ${REST_BASE}/all/repositories
  • Vite config:
    • vite.config.ts: dev proxy target configurable via process.env.VITE_PROXY_TARGET (default http://localhost:8080); base remains /core/ui/dist/
  • Playwright:
    • devDeps: @playwright/test, playwright
    • scripts: test:e2e, test:e2e:headed
    • playwright.config.ts: serves Vite dev server, baseURL http://localhost:5173/core/ui/
    • tests/smoke.spec.ts: verifies UI root loads
  • CI:
    • .github/workflows/ui-e2e.yml runs Playwright on UI changes
  • Docs:
    • core/src/main/webapp/ui/README.md updated with setup, env, dev, build, type-check, and E2E instructions

How to run locally

Notes

  • TypeScript type-check currently has pre-existing warnings/errors unrelated to these specific changes; Playwright smoke test runs independently and passes locally.
  • The test-results/ folder is untracked.
  • Future enhancement: Add API-dependent E2E by running backend in CI or mocking API routes.

Screenshots

  • N/A (smoke test is headless and basic)

…t E2E with smoke test; dev proxy env-configurable; docs and CI workflow

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 9 commits August 15, 2025 00:31
…E2E_WITH_BACKEND; AuthService uses REST_BASE; add backend CI workflow

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…E tests (documents, search, folder CRUD); tsconfig includes Node types; README backend E2E docs

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…NAPSHOT jars before starting Jetty; extend readiness wait

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…safe env access; CI: add containerized backend fallback and extended readiness; centralize REST repo endpoint

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…OM_BASE; add ATOM_BASE to config. CI: reorder OpenCMIS SNAPSHOT install before mvn install

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…ion) before root mvn install

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…s:1.2.0-SNAPSHOT) into local Maven before build

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…0-SNAPSHOT parent POM and jars; pre-install suspended nemakiware-action

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
@devin-ai-integration
Copy link
Contributor Author

Closing due to inactivity for more than 7 days. Configure here.

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.

0 participants