Skip to content

Cover the alignment on MobX 5 - #171

Merged
jtklein-agents merged 3 commits into
spec/118-page-store-mobx-7from
127-cover-the-alignment-on-mobx-5
Nov 15, 2026
Merged

jtklein-agents merged 3 commits into
spec/118-page-store-mobx-7from
127-cover-the-alignment-on-mobx-5

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #127

Summary

 jest/
+├── storeBridge.js           # stubBridge (listeners + fire), track (reaction recorder)
 src/app/store/
+├── alignmentStore.test.js   # 38 tests pinning Alignment on MobX 5

alignmentStore.test.js covers, through what a page-store caller observes:

Alignment
  observable fields   -> autorun re-runs when each field changes
  computeds           -> status, taxons, partitionType, partitionFileContent,
                         ngSubstitutionModelCmd, modelExtra, showPartition, ...
  loadParsedAlignment -> parsed fields, substitution model default,
                         substitution matrix default, modification dialog/snack, failed parse
  model selection     -> start, success, failure, cancel, setModelFromString, dispose/remove

No page store source changed. The bridge stub is local to the test (via jest/storeBridge.js), not in jest/setup.js.

Evidence

  • Before: no test file exercised Alignment as a unit.
    After: jest 185 tests pass (47 suites), lint clean, test:e2e 3 passed.
it('a failed parse sets the error, removes the alignment and stops listening')
  parseAlignment throws -> alignment.error, run.error set; run.alignments == []

typecheck:baseline still fails on other test files (e.g. App.test.js: "Cannot find name 'it'"), not on the new file, which has @ts-nocheck. The spec branch appears to lack the jest types from #168; not verified.

Merge Danger

Door: two-way

Blast Radius: tests-only

Adds a test file and a jest helper module. RunList.test.js and modelSelection.test.js keep their own copies of the stub; moving them to the helper is a follow-up.

🤖 Generated with Claude Code

jtklein-agents and others added 3 commits November 15, 2026 01:43
Tests pin the alignment's computeds, actions, observable fields, parsed-alignment
loader and model selection start, success, failure and cancel (#127).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit 7ebf681 into spec/118-page-store-mobx-7 Nov 15, 2026
8 checks passed
@jtklein-agents jtklein-agents mentioned this pull request Nov 15, 2026
9 tasks
@jtklein-agents
jtklein-agents deleted the 127-cover-the-alignment-on-mobx-5 branch November 15, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant