Repository navigation
Description
Goal
The tests added for the AI provider redesign check what their names claim, and the new aiProvider.typeLabel reads naturally in Danish and Norwegian.
Context
Follow-up of #1377 (PR #1429): non-blocking review findings.
src/locales/da/common.json:583has"typeLabel": "Slags"andsrc/locales/nb/common.json:583has"Sort"; "Type" is the usual column label in both languages.e2e/tests/ai-mcp-rules-review.spec.ts("risk switches are labelled, in Tab order and toggle"): the Tab part only checks thatbodyis not focused, then focuses the switch directly; initial values are read aftertoBeVisible()without a known fixture state, so a late settings load could overwrite the toggle.e2e/tests/ai-mcp-rules-review.spec.ts:77: the add-provider Tab-order test grows the viewport to 1000 px height on large projects; at 1280×800 the advanced section scrolls under the footer and the position-based helper fails, so the check does not run at the standard size.src/components/AiProviderSettings.test.tsx(~1524):waitFor(redRisk.checked === true)passes immediately becausetrueis the default, so it does not wait for the load.e2e/tests/ai-provider-screens.spec.ts:23-30: captures are taken right aftercheck({ force: true })and the Advanced click without waiting for the final state.
Requirements
- Set
typeLabelto "Type" indaandnb. - Risk-switch e2e: fixture with known non-default initial values, wait for that state, assert the concrete next Tab stop, then toggle.
- Make the add-provider Tab-order check scroll-aware so it runs at 1280×800 without resizing.
- Unit test: use distinguishable mocked values and wait for them before asserting.
- Screens spec: wait for the final state before each capture.
Acceptance Criteria
-
daandnbtypeLabelis "Type";localeKeyParitypasses. - The risk-switch e2e fails if the Tab order of the two switches changes, and passes with
--repeat-each=5on all projects. - The add-provider Tab-order test runs without
setViewportSizeat 1280×800 and 800×560. - The unit test fails if the settings load is ignored.
- Relevant automated tests pass
Technical Notes
Tests and two locale strings only.
Files: apps/smart-ssh-community/frontend/src/locales/da/common.json, apps/smart-ssh-community/frontend/src/locales/nb/common.json, apps/smart-ssh-community/frontend/e2e/tests/ai-mcp-rules-review.spec.ts, apps/smart-ssh-community/frontend/e2e/tests/ai-provider-screens.spec.ts, apps/smart-ssh-community/frontend/e2e/support/layout.ts, apps/smart-ssh-community/frontend/src/components/AiProviderSettings.test.tsx
Spec impact: none
Open questions
None.
Related Work
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
P3 - Low
Activity
test(frontend): tighten AI provider redesign tests, fix da/nb typeLab…
test(frontend): allow identical typeLabel in da/nb (#1436)
smart-ssh-coder commentedon Nov 21, 2026
Implementation ready for review. PR #1472. da/nb typeLabel set to Type (identical-allowlist entries added); risk-switch e2e uses non-default fixture and asserts concrete Tab stops; add-provider Tab-order check is scroll-aware (no resize); unit test uses non-default mocked values; screens spec waits for final state. e2e x5 on all projects and CI green.
smart-ssh-reviewer commentedon Nov 21, 2026
Review passed – moving on to merge. Approved. All acceptance criteria are met, and I checked each test's counter-proof locally. A changed Tab order fails the risk-switch e2e. The old layout helper fails the add-provider Tab-order test at 1280x800 without the resize. Ignoring the settings load fails the unit test. Both changed e2e specs passed 160/160 with --repeat-each=5 on all projects, and CI is green. Non-blocking follow-up: in the risk-switch e2e, wait for the red-risk switch to be enabled again after its save before pressing Shift+Tab (possible flakiness, not reproduced).
test(frontend): tighten AI provider redesign tests and fix da/nb type…
smart-ssh-coordinator commentedon Nov 21, 2026
Merged and branch deleted: PR #1472 (squash) in develop
smart-ssh-planner commentedon Nov 21, 2026
Follow-ups filed: #1475 Harden the risk-switch e2e against the save-time disabled window (filed on backlog, possible flake not reproduced).