refactor(lightspeed): split Lightspeed e2e into three spec files#2809
Conversation
Code Review by Qodo
|
Changed Packages
|
Review Summary by QodoSplit Lightspeed e2e tests into three focused spec files
WalkthroughsDescription• Split monolithic lightspeed.test.ts into three focused test suites - lightspeed.ui.test.ts for UI and display modes - lightspeed.mcp.test.ts for MCP settings and configuration - lightspeed.conversation.test.ts for chat flows and management • Extracted shared bootstrap logic into lightspeedE2eSetup.ts - Centralized setup with guest login inlined - Reusable bootstrapLightspeedE2ePage() function • Removed standalone utils/login.ts in favor of inline guest login Diagramflowchart LR
A["lightspeed.test.ts<br/>874 lines"] -->|split| B["lightspeed.ui.test.ts<br/>242 lines"]
A -->|split| C["lightspeed.mcp.test.ts<br/>336 lines"]
A -->|split| D["lightspeed.conversation.test.ts<br/>352 lines"]
B -->|uses| E["lightspeedE2eSetup.ts<br/>bootstrapLightspeedE2ePage"]
C -->|uses| E
D -->|uses| E
F["utils/login.ts"] -->|removed| E
File Changes1. workspaces/lightspeed/packages/app-legacy/e2e-tests/lightspeed.ui.test.ts
|
- Replace monolithic lightspeed.test.ts with lightspeed.ui, .mcp, and .conversation specs; add bootstrapLightspeedE2eSetup for shared mocks/login. - Move e2e-tests to workspace root; Playwright testDir e2e-tests; fix translation and fixture paths. Remove utils/login.ts; guest flow in setup helper. - package.json: test:e2e:nfs, test:e2e:all, playwright script runs both modes. - Guest post-login: assert Red Hat Catalog heading only when APP_MODE is not nfs. - expectBackstagePageVisible no-ops on nfs (no legacy catalog chrome). - Ignore e2e-tests in ESLint for lint-staged; update knip path. Made-with: Cursor
70fba4d to
071a24b
Compare
|



Description
What: Replace
lightspeed.test.tswithlightspeed.ui.test.ts,lightspeed.mcp.test.ts, andlightspeed.conversation.test.ts. Shared setup lives inutils/lightspeedE2eSetup.ts.Why: Smaller, clearer suites grouped by UI vs MCP vs chat flows; easier to maintain.
Note: Guest login is inlined in the bootstrap helper;
utils/login.tsremoved.CI / apps: E2e lives under
workspaces/lightspeed/e2e-tests/and runs against both frontends:yarn test:e2e:legacy(APP_MODE=legacy,packages/app-legacy) andyarn test:e2e:nfs(APP_MODE=nfs,packages/app);yarn playwright testruns both in sequence. Guest login post-checks are mode-specific (legacy: “Red Hat Catalog” heading; NFS:/catalogURL) so each shell can finish bootstrap reliably.Resolves:
https://redhat.atlassian.net/browse/RHIDP-13186