Skip to content

B-S7D5-desktop-experience-unit-suites

The Agent Pants desktop experience (solutions/determined/experiences/agent-pants) has unit tests only for pure utilities. The three branching composables (useAgentPantsComponentSource, useAgentPantsEditorProvider, useAgentSkillAuthoring) and the three branching components (ApComponentTree, ApInstallModal, ApNewComponentWizard) have none.

A draft suite existed on the branch behind #1589: a test/mount.ts harness rendering server-side with Nuxt globals stubbed, a test/preload.ts, a bunfig.toml, a "test": "bun test" script, and six suites. The marketplace page and plugin page rebuilt the component tree, the wizard and the component-source helpers after that branch was cut, so the suites no longer match the components. The harness is still reusable.

Do this after the primitive consumer switch lands (DFieldRow, DNotesDisclosure, DPathChange adoption), since that changes the same components again. Then:

  • Bring over the harness and the package script.
  • Rewrite the six suites against the current components. The wizard’s step, steps and next() are internal to <script setup>; advancing a step needs a DOM or a defineExpose surface, so decide which before writing that suite.
  • Close solutions/agent-pants/docs/vault/tasks/unit-test-the-desktop-composables.md when the suites exist.

← Back to Backlog