Skip to content

E2E: tauri driver setup#8095

Draft
qnixsynapse wants to merge 16 commits into
mainfrom
e2e/tauri-driver-setup
Draft

E2E: tauri driver setup#8095
qnixsynapse wants to merge 16 commits into
mainfrom
e2e/tauri-driver-setup

Conversation

@qnixsynapse
Copy link
Copy Markdown
Contributor

Describe Your Changes

  • Initial support for E2E testing with tauri-driver, based on autoQA. Only Ubuntu CPU is enabled for now.

Further spec TBD.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@qnixsynapse qnixsynapse marked this pull request as draft April 27, 2026 13:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

Barecheck - Code coverage report

Total: 48.38%

Your code coverage diff: -0.64% ▾

Uncovered files and lines
FileLines
e2e/wdio.conf.ts1-7, 9, 11, 14-17, 19, 21-23, 25-47, 59-70, 73-77, 79, 81-83, 85-86, 88-90, 94-101, 103-106, 108-114, 117-126, 128-131, 134-140, 148-158, 160-161, 163-168, 170-174
e2e/helpers/app.ts1, 4-5, 11-14, 17-21, 24-31, 34-37, 40-44
e2e/helpers/profile.ts1-5, 37-39, 45-49, 51-57, 59-61, 64-68, 70-84, 90-92
e2e/helpers/profileState.ts1, 8, 10-12, 14-16, 18-20, 28-35
e2e/helpers/settings.ts1-2, 27-30, 33-48, 51-53, 60-63
e2e/specs/hub-navigation.e2e.ts1-2, 9-12, 14-18, 20-24, 26-32
e2e/specs/llamacpp-inference.e2e.ts1, 14, 16-18, 21, 25-27, 30-37, 40-41, 44-45, 48-58, 60-64
e2e/specs/provider-crud.e2e.ts1-2, 13, 15-20, 22-24, 26-27, 29-34, 37-40, 42-44, 46-47, 50-56
e2e/specs/settings-assistants.e2e.ts1-3, 12-15, 17-20, 23-26, 28-30, 34-36, 38-40, 42-44, 48-51, 53-55, 57-60, 62-68
e2e/specs/settings-hardware.e2e.ts1-3, 10-13, 15-17, 19-21, 23-25, 29-31
e2e/specs/settings-https-proxy.e2e.ts1-3, 13-16, 18-19, 21-24, 26-29, 31-36
e2e/specs/settings-interface-persistence.e2e.ts1-3, 16-19, 21-22, 25-28, 30-36, 39-42, 44-50, 53-54, 56-61, 63-66
e2e/specs/settings-interface.e2e.ts1-3, 11-14, 16-19, 21-24, 26-29
e2e/specs/settings-misc.e2e.ts1-3, 19-22, 24-28, 30-39, 41-44, 46-49, 51-52, 55-57, 59-62, 64-65, 67-68, 70-72, 76-79
e2e/specs/settings-shortcuts.e2e.ts1-3, 11-14, 16-19, 21, 24-26, 29-33
e2e/specs/sidebar-nav.e2e.ts1-2, 8-11, 13-17, 19-24, 26-30, 32-34, 36-37, 39-44, 46-48
e2e/specs/smoke.e2e.ts1-2, 4-9
e2e/specs/threads-crud.e2e.ts1-3, 12-13, 15-21, 24-25, 27-31, 33-35, 37-42, 44-51, 53-57, 59-60, 62-66
web-app/src/components/left-sidebar/NavMain.tsx2, 4, 9-10, 12-15, 19, 23, 27, 31-32, 36-43, 69-86, 88-99, 101-113, 115-126, 128-141, 143-146, 149-151, 153-158, 161-169, 171-173, 175, 177-195, 197-204, 206-216, 218, 220-226, 228-233, 235-239, 241-242, 244-245, 247-252, 254-255, 257
web-app/src/containers/Card.tsx1, 23-46, 48-53, 55-62, 64-65, 67-71, 73, 75, 77-81, 83-86, 88-90, 92
web-app/src/containers/ChatInput.tsx161, 203-206, 216-223, 228, 254-255, 299-300, 323, 328-330, 352-353, 355-357, 392-394, 397-403, 405-408, 410, 412-416, 418-426, 428, 431, 433-449, 453-455, 457, 459-467, 470-473, 476-479, 481-485, 487, 493, 498-501, 504-507, 527-528, 551-557, 565, 570-574, 576-587, 589, 591-600, 602-605, 609-618, 628-638, 640-650, 652-659, 661-663, 665-671, 673-676, 678-682, 684-689, 691-696, 698-699, 701-704, 706-713, 715-732, 734-744, 746-760, 762-768, 770-784, 787-807, 809-812, 814-824, 826-827, 829-834, 836-837, 839-845, 847-850, 852-856, 858-866, 869, 872-877, 879-893, 895-898, 901-911, 914-920, 923-925, 927-928, 931, 933-936, 939-940, 943-946, 948-949, 952-955, 957-976, 979-983, 985-986, 988-990, 992-1003, 1005-1021, 1023-1025, 1027-1038, 1040-1043, 1045-1047, 1049-1085, 1088-1092, 1094-1099, 1101-1105, 1107-1108, 1110-1115, 1119, 1121-1122, 1125-1128, 1130-1133, 1137-1147, 1149-1151, 1153-1154, 1156-1157, 1160-1163, 1165-1174, 1176-1185, 1187-1193, 1195-1198, 1200-1201, 1205-1210, 1214, 1216-1221, 1223, 1225-1231, 1233-1242, 1244-1247, 1257-1258, 1260-1263, 1266-1267, 1270-1274, 1277-1278, 1280-1283, 1286-1288, 1291-1293, 1296-1299, 1301-1302, 1304-1308, 1310-1312, 1316-1318, 1321-1324, 1326-1327, 1329-1330, 1332-1337, 1340-1346, 1348-1352, 1355, 1357-1361, 1364-1371, 1373-1376, 1378-1380, 1382-1393, 1395-1401, 1403-1409, 1412-1415, 1417, 1482-1487, 1489, 1504-1506, 1508-1511, 1544-1547, 1654-1657, 1666, 1694-1698, 1701-1709, 1711-1714, 1716-1721, 1723-1727, 1729-1742, 1744-1748, 1751-1754, 1765-1775, 1778-1782, 1784-1790, 1792-1803, 1807-1811, 1813-1822, 1827, 1829-1833, 1835-1837, 1840-1842, 1844-1846, 1848-1854, 1856-1863, 1865-1870, 1872-1878, 1880-1887, 1922-1934, 1938-1950, 1957-1976, 1987-1994, 2027, 2029-2032, 2039-2058
web-app/src/containers/FontSizeSwitcher.tsx1, 7-14, 16-18, 20-22, 24-29, 31-35, 37-45, 47, 49-58, 60-75, 77-81, 83
web-app/src/containers/MessageItem.tsx143-144, 156-157, 159-160, 242, 252-259, 261-262, 264, 266, 271-272, 291, 368, 378, 390-395, 397-398, 405, 439, 500-503, 507, 532-534, 536-542, 549-551, 553-559, 561
web-app/src/containers/ModelDownloadAction.tsx1-8, 10-12, 14-17, 20-21, 23-37, 39, 41-55, 57-63, 65-78, 80-88, 90-99, 101, 103-110, 112-113, 115, 117-122, 124-125, 127
web-app/src/containers/SettingsMenu.tsx41-62, 252, 288-289, 299-302
web-app/src/containers/ThemeSwitcher.tsx1, 7-14, 16-18, 20-21, 23-27, 29, 31-36, 38-42, 44-52, 54, 56-65, 67-82, 84-88, 90
web-app/src/containers/ThreadList.tsx83, 90-92, 110-112, 118-124, 126-131, 133-135, 143-145, 191-197, 199-204, 209-224, 226-229, 237-240, 279
web-app/src/containers/dialogs/AddProjectDialog.tsx1-2, 9, 16-24, 39-51, 53, 55-60, 62-63, 65, 68-72, 74-77, 79, 82-89, 91-95, 98-101, 103-135, 137-144, 146-147, 149-151, 153-158, 160-167, 169-175, 177-183, 185-203, 205-214, 216
web-app/src/containers/dialogs/AddProviderDialog.tsx30-35, 38-40, 43-46, 48-49, 52-56, 64-66
web-app/src/containers/dialogs/DeleteProvider.tsx1-2, 13-21, 26-34, 36, 38, 40-45, 47-62, 64-74, 76-89, 91-102, 104-109, 111, 113-114
web-app/src/containers/dialogs/DeleteThreadDialog.tsx31-42, 44-52, 54-59, 61-74, 76-80, 82-90, 92-96, 98-117, 119-124, 126
web-app/src/containers/dialogs/RenameThreadDialog.tsx29-40, 42-50, 52-60, 62-67, 69-79, 81-86, 88-96, 98-122, 124-129, 131
web-app/src/routes/hub/index.tsx2-7, 16-19, 28-29, 34-35, 41, 43-54, 60-65, 67-71, 73, 75-87, 89-92, 94-100, 102-112, 114-118, 120-125, 128-129, 132-136, 139-147, 150, 152-157, 159-160, 162-163, 165-170, 172-176, 178-185, 187-194, 196-200, 202-212, 215-218, 220-228, 231-241, 243, 245-248, 251-252, 255-257, 259-265, 267-270, 272-298, 300-303, 305-308, 310, 312-315, 317-331, 333-335, 338-340, 343-346, 348, 350-353, 355-368, 371-373, 375-377, 379-380, 382-396, 398-411, 413-421, 423, 425-432, 434-437, 439-453, 455, 457-461, 463-484, 486-490, 492-500, 502-514, 516-530, 532-546, 549-558, 560-574, 576-585, 587-594, 596-599, 601-602, 605-614, 616-620, 622-652, 654-657, 659-664, 666-683, 685-700, 702-712, 715-724, 726-729, 731, 733-765, 767-783, 785-786, 788-795, 797-799, 801, 804-805, 807-812, 814, 816-819, 821, 823, 825, 827-828, 830-834, 836-839, 841
web-app/src/routes/settings/assistant.tsx1-3, 5, 7-17, 23-24, 27-29, 31-44, 46-49, 51-57, 59-67, 69-70, 72-87, 89-99, 102-113, 115-128, 130-140, 142-146, 148-154, 156-162, 164-173, 175-179, 181-191, 193-200, 202-216, 218-227, 229
web-app/src/routes/settings/general.tsx52, 56-57, 82-84, 88-99, 102-113, 116-122, 128-129, 133-140, 143-147, 149-154, 157-162, 164-167, 169-182, 184-185, 187-190, 202-203, 283, 288, 293-298, 324-334, 336-337, 363-367, 395-400, 402-408, 410-411, 413-417, 419-420, 423, 483-534
web-app/src/routes/settings/hardware.tsx78, 87, 96-97, 99-107, 114-119, 122-137, 324, 326-331, 333, 353-354, 357-363, 383
web-app/src/routes/settings/https-proxy.tsx1-11, 14-16, 18-34, 36-41, 43-54, 56, 58-69, 72-85, 87-111, 113-114, 116, 118-122, 124-136, 138-146, 148-153, 155
web-app/src/routes/settings/local-api-server.tsx1-24, 26, 31, 37, 42, 48, 51-53, 55-77, 79-86, 88-90, 92-104, 107-110, 112, 114, 116-120, 127, 129, 131-140, 143-153, 156-159, 161-173, 175-184, 187-190, 193-197, 199-207, 209-227, 229-237, 239-243, 245-251, 253, 255-262, 264-270, 272-276, 278-356, 358-366, 368-369, 371-419, 421-422, 424-441, 443-446, 449-458, 460-470, 472-494, 497-501, 503-504, 506-517, 519, 522, 524-534, 536-540, 542-544, 546-563, 565, 567-581, 583
web-app/src/routes/settings/mcp-servers.tsx42, 44-46, 49-66, 69, 71-76, 79-81, 83-84, 86-89, 144-149, 151-155, 165-166, 170, 172-174, 179-180, 182-183, 193, 195-197, 199-203, 206, 208-211, 213-220, 222-227, 230-231, 234-236, 239, 241-245, 247-254, 257, 259-261, 263-270, 273, 280-286, 288-290, 292-293, 295-297, 301-306, 308-313, 316-319, 322-325, 327-329, 344-354, 370-382, 392, 492, 495-496, 511-522, 538-548, 564-569, 580-582, 590-592, 604, 612-619, 643-648, 651-652, 655-661, 663-664, 668-679, 681-682, 684
web-app/src/routes/settings/shortcuts.tsx55-56, 58-59, 61-62, 64-65
web-app/src/routes/settings/providers/$providerName.tsx92-94, 96, 98, 101-106, 108-110, 112-118, 123-124, 126-133, 135-136, 138-150, 152-153, 168-174, 180-182, 184-185, 238-241, 267, 269, 271, 286, 325-326, 338, 347-353, 371-372, 379-381, 485, 608-612, 638, 640-641, 707, 717-722, 724, 726, 737, 744, 910-911, 1026-1036, 1038, 1143-1152, 1154-1159, 1161

@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented Apr 28, 2026

Review: E2E tauri-driver setup

Good foundational work setting up the tauri-driver + WebdriverIO harness. The architecture is sound. A few issues to address before this is merge-ready:

Must Fix

  1. __dirname is undefined in ESMe2e/package.json sets "type": "module" but wdio.conf.ts uses __dirname, which doesn't exist in ESM. This will crash at startup. Use import.meta.url + fileURLToPath instead, or drop the "type": "module" declaration.

Should Fix

  1. Profile isolation may not propagate — The env vars (XDG_DATA_HOME etc.) are set on the tauri-driver process, but tauri-driver spawns the Jan binary internally. Verify that these env vars actually reach the Jan process. If not, the tests will use (and pollute) the real user profile.

  2. tauri-driver startup racebeforeSession() spawns tauri-driver and immediately returns. WDIO may try to connect before port 4444 is ready. Consider adding connectionRetryTimeout / connectionRetryCount to the WDIO config, or a small readiness poll.

  3. Non-unique data-testid for hub buttonshub-use-button and hub-download-button appear on every model card. After searching, the first match may not be the target model. Consider scoping the selector (e.g., find the model card first, then find the button within it) or making the testid include the model name.

Nice to Have

  1. Hardcoded nightly URL will rot — consider resolving "latest" dynamically or at least adding a comment that it must be updated.
  2. No pull_request trigger in the workflow — the E2E tests won't gate PRs. Intentional for now?
  3. Missing lockfile for e2e/ — builds won't be reproducible.

Recommendation: fix needed

Copy link
Copy Markdown

@tokamak-pm tokamak-pm Bot left a comment

Choose a reason for hiding this comment

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

Re-Review: New commit since Apr 28

Reviewed the new commit 6e47ca08 ("fix(e2e): address review feedback on tauri-driver harness").

Previous issues -- status

# Issue Status
1 __dirname undefined in ESM (must fix) Fixed -- removed "type": "module" from e2e/package.json
2 Profile isolation may not propagate (should fix) Fixed -- added tauri:options.env forwarding + fallback on the tauri-driver process
3 tauri-driver startup race (should fix) Fixed -- waitForPort() polls port 4444 with 30s timeout; WDIO gets connectionRetryTimeout + connectionRetryCount
4 Non-unique hub button testids (should fix) Fixed -- testids now scoped by model_id (e.g. hub-use-button-qwen3-0.6B)
5 Hardcoded nightly URL (nice to have) Not addressed -- acceptable for draft
6 No pull_request trigger (nice to have) Not addressed -- intentional per draft
7 Missing lockfile (nice to have) Not addressed -- CI uses --no-immutable

All four "must fix" / "should fix" items have been addressed with solid implementations.

New observations

  • The get env() getter on tauri:options works because WDIO reads capabilities after beforeSession() populates profileEnv, but the timing dependency is subtle. A brief inline comment noting the lazy-evaluation reason would help future maintainers.
  • The waitForPort() implementation is clean -- TCP connect check with 200ms retry delay and a configurable timeout.
  • The dual approach for env propagation (both tauri:options.env and inheriting on tauri-driver's process) is good belt-and-braces engineering.

Remaining items (non-blocking)

  1. Consider generating or committing a yarn.lock for e2e/ before merging to ensure reproducible CI builds.
  2. The hardcoded .deb URL will become stale -- a follow-up to resolve "latest" dynamically would be valuable.
  3. PR is still in draft with unchecked self-checklist items.

Recommendation: can merge (once moved out of draft). All substantive issues from the first review have been addressed.

@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented May 1, 2026

Review: E2E tauri-driver setup

Summary: Introduces an E2E testing harness using tauri-driver + WebdriverIO. Adds a GitHub Actions workflow, WDIO config with profile isolation, a smoke spec, a llama.cpp inference spec, and data-testid attributes on key UI components.

Positive observations

  • Well-architected: profile isolation via XDG_DATA_HOME/APPDATA tempdir, proper waitForPort polling, cleanup with JAN_KEEP_PROFILE escape hatch for debugging.
  • The workflow supports both download (pre-built .deb) and build (from source) modes, which is flexible for CI and PR testing.
  • Adding data-testid attributes to NavMain, MessageItem, ModelDownloadAction, and Hub search is the right approach for stable selectors.
  • The data-streaming attribute on messages is a nice touch for waiting on completion.

Issues and observations

  1. Hardcoded nightly .deb URL will rot. DEFAULT_JAN_APP_URL points to a specific nightly build (Jan-nightly_0.6.4-728_amd64.deb). This will become stale. Consider using a "latest" symlink URL or fetching the latest nightly dynamically from the release API.
  2. llamacpp-inference.e2e.ts has a 10-minute download timeout. This is noted as a known issue, but in CI with no model cache, this spec will be slow and fragile. Consider either pre-seeding the model in CI or gating this spec behind an explicit flag so the smoke spec can run independently.
  3. Unused chars variable in the workflow. The onPrepare hook in wdio.conf.ts throws a clear error if tauri-driver is missing, which is good. However, if tauri-driver crashes mid-session, the tauriDriver.on('error') handler throws but that error may not propagate cleanly to the test runner. Consider logging + failing more gracefully.
  4. yarn install --no-immutable in CI. The e2e step disables immutable installs. This is understandable since the e2e package is new and may not be in the root lockfile, but it means CI won't catch lockfile drift. Consider adding the e2e deps to the workspace lockfile.
  5. No .yarnrc.yml or workspace config for the e2e directory. If this is meant to be a separate package outside the yarn workspace, that's fine, but it should be documented. If it should be part of the workspace, add it to the root package.json workspaces array.
  6. Minor: testId prop on NavMainItem type. Adding testId as an optional prop is fine, but only one nav item (hub) uses it. Consider adding test IDs to all nav items for consistency, or document which items have them.

Recommendation: improve needed

@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented May 5, 2026

Follow-up Review (commit 0ce151f)

Reviewing the new commit 0ce151f3 ("test(e2e): expand UI specs with sidebar nav and hub search coverage") pushed on 2026-05-04, since our last review on 2026-05-01.

What changed

This commit adds two new E2E spec files and the corresponding data-testid attributes in the React components:

  • sidebar-nav.e2e.ts (67 lines, 4 tests) -- Settings page navigation, New Project dialog open/dismiss, New Chat navigation, send button enabled/disabled state.
  • hub-navigation.e2e.ts (40 lines, 2 tests) -- Hub sidebar navigation and search input value retention.
  • New data-testid attributes on nav-new-chat, nav-new-project, nav-settings (NavMain.tsx), add-project-dialog (AddProjectDialog.tsx), settings-page (settings/general.tsx).
  • Normalizes data-test-id to data-testid on the send-message-button in ChatInput.tsx, with matching updates to the unit tests in ChatInput.test.tsx.

Positive observations

  1. Test IDs on all nav items. Our May 1 review noted that only the Hub nav item had a testId -- this commit adds them to all four sidebar entries (new chat, new project, hub, settings). This directly addresses observation Add inference sd cpp #6 from that review.
  2. Good test hygiene. The sidebar-nav spec properly dismisses the New Project dialog with Escape and waits for it to disappear before moving on. The send-button test resets the input value at the end. This prevents state leaking between test cases.
  3. Appropriate scope. Both new specs are UI-only with no model downloads, making them fast and deterministic. They complement the existing smoke and inference specs well.
  4. data-testid normalization. Standardizing from data-test-id to data-testid is the correct convention (matches Testing Library and the rest of the codebase). The unit test updates are consistent.
  5. Descriptive timeout messages. Custom timeoutMsg strings in waitUntil calls will produce actionable failure output in CI logs.

Remaining observations (non-blocking)

  1. Default workflow spec is still smoke.e2e.ts only. The new sidebar-nav and hub-navigation specs won't run in CI unless the spec input is changed or left empty (which runs all specs). This is fine for now since they are new and the glob specs/**/*.e2e.ts in wdio.conf.ts covers them when no --spec override is given, but it is worth noting that workflow_dispatch defaults will skip them.
  2. Test ordering dependency. sidebar-nav.e2e.ts tests assume the app starts on a route where the chat input is visible (the "navigates to a fresh chat" test) and that Settings/Project/Chat navigations happen in order within a single session. If WDIO ever randomizes test order or runs these in separate sessions, the "disables the send button" test depends on already being on the chat route from the previous test. This is acceptable for now given maxInstances: 1 and sequential execution, but worth keeping in mind.
  3. Residual data-test-id in other files. While ChatInput.tsx was normalized, MlxModelDownloadAction.tsx and DownloadButton.tsx still use data-test-id (not data-testid). A follow-up cleanup would maintain consistency across the codebase.
  4. Missing lockfile and hardcoded nightly URL remain from previous reviews -- these are tracked as known follow-up items.

Recommendation: can merge

qnixsynapse added 15 commits May 6, 2026 09:04
Replaces the agent-driven autoqa flow for deterministic UI smoke tests.
Includes a llama.cpp inference spec and stable data-testid hooks on the
Hub nav, search input, Use/Download buttons, chat input, and message
bubbles. Per-run XDG/APPDATA tempdirs keep tests off the user profile.
Mirrors autoqa-reliability.yml's .deb-from-URL pattern for fast runs
against nightly, with an opt-in build mode for PR validation. xvfb +
webkit2gtk-driver + cargo-installed tauri-driver on ubuntu-22.04.
Default spec: smoke only — inference spec stays opt-in via input.
Push events provide no inputs, so route everything through env vars
with fallbacks. On main, build the source we just landed instead of
pulling a stale nightly. Path filters keep doc-only pushes from
triggering a 25 min build.
- Drop "type": "module" from e2e/package.json so __dirname works in
  wdio.conf.ts (was crashing under ESM).
- Forward profile env (XDG_DATA_HOME / APPDATA) to the spawned Jan
  binary via tauri:options.env so isolation reaches the app even if
  tauri-driver doesn't inherit the parent environment. Keep the same
  overrides on the tauri-driver process as a fallback.
- Wait for port 4444 in beforeSession() and add WDIO connection
  retry config so sessions don't race tauri-driver startup.
- Suffix hub-use-button / hub-download-button testids with model_id
  to scope e2e selectors to the targeted model card. Update the
  llamacpp inference spec to use the scoped selectors.
Drops the VLM-driven Python E2E runner in favor of the deterministic
tauri-driver + WebdriverIO setup under e2e/. Removes the autoqa/
directory, its four GitHub workflows, and stale references in
CONTRIBUTING.md and e2e/README.md.
- helpers/app.ts: waitForApp, clickNav, byTestId, existsTestId,
  dismissDialog
- helpers/settings.ts: openSettings(tab), settingsControl,
  reloadRenderer, SettingsTab union
- wdio.conf.ts: pin LANG/LC_ALL/LANGUAGE=en_US.UTF-8 for the spawned
  Jan process; capture PNG screenshots of failed tests into
  e2e/screenshots/; correct config type to WebdriverIO.Config
- e2e-tauri-driver.yml: upload screenshots/ artifact on failure
- Refactor existing specs onto the helpers; fix pre-existing
  $$().length misuse in llamacpp-inference spec
- README: document helpers, conventions (English-only, testid-only,
  manual-only flows under specs/manual/)
Adds stable data-testid hooks consumed by the upcoming WebdriverIO
settings specs:

- SettingsMenu: settings-tab-<slug> on every core/integration entry
- interface: settings-panel-interface, settings-interface-reset
- shortcuts: settings-panel-shortcuts
- hardware:  settings-panel-hardware, plus settings-hardware-{os,cpu,memory}
- https-proxy: settings-panel-https-proxy, settings-https-proxy-{enabled,url}
…https-proxy)

Four UI-only specs covering the settings surfaces that were previously
covered by the manual checklist alone:

- interface: panel renders Theme/Font Size/Accent rows + Reset button
- shortcuts: all groups (Application/Chat/Navigation) and key shortcuts
  surface; relies on the en-locale pin in wdio.conf.ts
- hardware:  OS/CPU/Memory cards render with non-empty values; memory
  reports a unit (regression guard against label-only render)
- https-proxy: URL field persists across renderer reload via
  useProxyConfig

Also extends openSettings() to drive tanstack-router by URL for tabs
not surfaced in the sidebar (https-proxy, extensions), and broadens
the SettingsTab union to match the actual route slugs.
Replaces the wrapper-div hack used in hardware.tsx and gives every
container a built-in testid hook for upcoming threads/assistants/MCP
specs. Behavior unchanged — testId is forwarded as data-testid only
when provided.
- assistant.tsx: testids on the panel container, add button, default
  trigger, per-assistant item, edit/delete buttons
- MessageItem.tsx: testid on the regenerate button (used by future
  chat-message specs under specs/manual/)
- New settings-assistants.e2e.ts: panel renders default Jan, Add
  dialog opens/closes, default-fallback dropdown lists assistants,
  edit dialog opens for existing assistants
- README: document the checklist features that no longer exist in
  current code (thread starring, favourites, sidebar search) and
  point model-dependent flows at the planned specs/manual/ folder
Introduces a profile-fixtures harness so specs can exercise thread and
assistant flows without needing a running model:

- helpers/profileState.ts: shared per-worker profile state, exposes
  getJanDataFolder() that mirrors src-tauri's resolve_jan_data_folder
- helpers/profile.ts: seedThread / seedAssistant write directly to
  <profile>/Jan/data/{threads,assistants}/<id>/... using the Rust
  on-disk layout; reloadAfterSeed() refreshes the renderer so stores
  re-hydrate from disk
- wdio.conf.ts: publishes profileDir into profileState on session
  start, clears it on teardown

Adds testids on ThreadList items and the rename/delete dialogs, then
threads-crud.e2e.ts seeds two threads, renames one, deletes the other,
and asserts sidebar state. Create-via-UI still requires a model and
remains a specs/manual/ candidate.
- AddProviderDialog: testids on the name input and create confirm
- DeleteProvider: testids on the delete trigger and confirm
- SettingsMenu: testid on the +Add provider button and on each
  provider sidebar row (provider-sidebar-<name>)
- providers/$providerName.tsx: testids on the panel container
  (provider-page-<name>) and the active toggle (provider-active-<name>)
- New provider-crud.e2e.ts: drives the sidebar +button to create a
  uniquely-named custom provider, asserts the new sidebar entry and
  settings page mount, then deletes via the per-provider delete
  confirmation. UI-only, no real API key or remote traffic.

Predefined providers (OpenAI, Anthropic, ...) cannot be deleted by
design (DeleteProvider returns null for them); the spec uses a
timestamp-suffixed custom provider name to stay hermetic.
Three UI-only specs covering the remaining settings surfaces that
don't need a running model or external service:

- mcp-servers.tsx: testid on the panel container and Add Server
  header button
- local-api-server.tsx: testid on the panel and start/stop toggle
- general.tsx: testid on the factory-reset trigger

settings-misc.e2e.ts asserts each panel mounts on a fresh profile,
the Add MCP Server dialog opens (Escape-dismissed, no persistence),
and the factory-reset confirmation dialog opens — explicitly
Escape-dismissed without confirming, since a real reset would wipe
the profile and break sibling tests.

MCP CRUD with env vars / streamable-http, /v1/models verification
on the Local API Server, and the Hub model-card render all require
external state and remain specs/manual/ candidates.
- ThemeSwitcher: testids on the dropdown trigger and each option;
  expose the live value via data-theme-active for locale-independent
  assertions
- FontSizeSwitcher: same — data-font-size-active on the trigger,
  testid per option
- New settings-interface-persistence.e2e.ts: pick a non-default theme
  (light) and font size (18px), reload the renderer, reopen the
  Interface panel, assert both values re-hydrated from the Zustand
  persist store backed by WebKit localStorage in the pinned profile
@qnixsynapse qnixsynapse force-pushed the e2e/tauri-driver-setup branch from eb06924 to 5cd7d7a Compare May 6, 2026 03:34
@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented Jun 3, 2026

Follow-up review (new activity detected)

Since our last review (2026-05-05), there has been one new commit:

New commit

0ce151f3 (2026-05-04, pushed 2026-05-06) -- "test(e2e): expand UI specs with sidebar nav and hub search coverage"

  • Adds two new E2E spec files: sidebar-nav.e2e.ts (4 tests) and hub-search.e2e.ts (3 tests)
  • Adds corresponding data-testid attributes to React components (sidebar, hub search, new project dialog)
  • Expands the GitHub Actions matrix with additional test labels

Assessment

This is a draft PR and the new commit continues in the right direction -- expanding E2E coverage beyond the initial smoke test. The previous concerns from our review still apply:

  1. __dirname in ESM -- Still needs to be verified whether wdio.conf.ts uses __dirname with "type": "module" in e2e/package.json (would crash at startup)
  2. Profile cleanup timing -- The afterAll cleanup still relies on graceful test completion; a crash mid-test would leave temp profiles on disk
  3. Deletion of autoqa workflows -- This PR removes autoqa-manual-trigger.yml, autoqa-migration.yml, and autoqa-reliability.yml. Confirm these are intentionally deprecated by the new tauri-driver approach

Since this is still a draft PR, the work-in-progress nature is expected. The E2E framework architecture remains sound.

Recommendation: improve needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant