Commit Graph

14 Commits

Author SHA1 Message Date
Osvaldo Ortega
f22a90205c Updates 2026-03-10 15:48:52 -07:00
Osvaldo Ortega
6012003733 Move TS test files to src/vs/sessions/test/
The test/e2e/ directory was too deep for TypeScript to resolve imports
back to src/vs/. Move to test/ (one level up) where imports work.

E2E runner scripts (.cjs) and scenarios stay in test/e2e/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 14:03:51 -08:00
Osvaldo Ortega
02d5d0ed10 Move test files to src/vs/sessions/test/e2e/
Keeps all E2E test code (mocks, runners, scenarios, extensions) in one
place, separate from production Sessions code. Updates import paths,
server path, and ESLint config.

Note: ESLint import-patterns warnings remain because the relative
imports from test/e2e/ depth don't match the restriction glob syntax.
This is cosmetic — the imports are valid TypeScript.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 13:58:54 -08:00
Osvaldo Ortega
4d61c82ede Add Approach 2: Service overrides for E2E mock testing
New files:
- web.test.ts: TestSessionsBrowserMain with MockChatEntitlementService
- web.test.factory.ts: Factory using TestSessionsBrowserMain
- sessions.web.test.internal.ts: Test entry point

Server uses test entry point when --mock, which injects a mock
IChatEntitlementService returning ChatEntitlement.Free with
installed=true, so Sessions thinks the user is signed in.

Also adds ESLint import patterns for sessions web entry points.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:57:48 -08:00
Osvaldo Ortega
7fc071c83b Use mock-fs:// scheme instead of github-remote-file://
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:46:28 -08:00
Osvaldo Ortega
4b72d7e678 Open mock workspace folder when --mock is used
Pre-sets the workspace to github-remote-file://mock-repo/ so the
Sessions UI starts with a folder already open, backed by the mock
file system provider from the E2E extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:44:57 -08:00
Osvaldo Ortega
fafc62f5ac Add mock web extension for E2E testing
New extension at extensions/sessions-e2e-mock/ provides:
- Mock GitHub auth provider (fake token, skips sign-in)
- Mock chat participant (canned responses based on input keywords)
- Mock file system for github-remote-file:// (in-memory files)

Server loads the extension when --mock flag is passed. The generate
and test runners both use --mock automatically.

New npm scripts:
- serve:mock — opens Sessions in browser with mocks loaded

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:34:34 -08:00
Osvaldo Ortega
c677691c87 Add --skip-welcome flag to web server and serve script
The serve script now opens with ?skip-sessions-welcome to bypass
the sign-in overlay during manual testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:16:31 -08:00
Osvaldo Ortega
55fe7db35d Add multiple Playwright YAML configuration files for session management UI
- Created new YAML files to define the structure and components of the session management interface.
- Included various toolbars, buttons, and alerts to enhance user interaction.
- Implemented features such as session actions, agent sessions, and folder picker options.
- Ensured accessibility with appropriate cursor pointers and disabled states for buttons.
2026-03-03 18:31:32 -08:00
Osvaldo Ortega
692fb00057 Refactor: update isSessionsWindow getter to use payload for dynamic value 2026-03-02 22:21:51 -08:00
Osvaldo Ortega
4ee10a3e48 Refactor: update getSessionsHTML to improve CSS module handling and file root definition 2026-03-02 21:26:06 -08:00
Osvaldo Ortega
63073c972b Refactor: update CSS module collection to use tinyglobby and add fallback for recursive file search 2026-03-02 20:14:34 -08:00
Osvaldo Ortega
4b93e8fe0e Fix: update open function call to use default export for URL opening 2026-03-02 18:54:51 -08:00
Osvaldo Ortega
71eca7dfec Add Sessions web entry point and supporting scripts for session management 2026-03-02 18:48:46 -08:00