Skip to content

test: prune styling, layout and wall-clock tests - #162

Merged
aicayzer merged 7 commits into
mainfrom
chore/prune-tests
Oct 26, 2026
Merged

aicayzer merged 7 commits into
mainfrom
chore/prune-tests

Conversation

@aicayzer

@aicayzer aicayzer commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Prunes tests that check styling, layout, exact wording or wall-clock time, and makes the editor tests independent of WebKit's animation frames. Every test that guards a person's text or data, the Marfa mapping, link resolution and the Live plan is unchanged.

What was removed or changed

Test Reason
SoftSelectionTests (2 tests) Checked the frames of a drawn selection mark. Pure layout.
WebViewContainerTests Checked the web view's frame against layout constants.
LibraryPerformanceTests Wall-clock ceilings (50 ms) that fail on a loaded machine and only report on a fixture library.
InterfaceStyleTests.semanticFontsScaleWithoutChangingTheirTraits Restated how fonts scale. The test for unreadable stored sizes stays.
ItemTableLayoutTests.theRingFollowsTheTone Restated a mapping from status to a drawn mark.
SidebarTests.theFootsDotIsOrange... Restated a mapping from connection state to a dot color.
SyncStatusTests.countsAgreeWithTheirNouns Restated string formatting that the other wording tests already exercise.
SyncWordingTests (exact paragraphs) Exact-sentence assertions replaced with the facts that matter (kind, actions, counts, the way out named). Both no-jargon tests stay.
EditorTests.nativeFindGeometryFollowsViewportAndAppearanceChanges Needed the page to draw frames, which a covered window never does (#144). Layout of Find marks only.
EditorTests+Header margin loop Checked title and text margins at four widths after waiting for frames (#144). Layout only. The scroll and crossing checks stay.
changingItemsAfterScrollingStartsAtTheTopAndStaysThere Kept, rewritten to wait on conditions instead of frames (#144).
MarfaSourceOfflineTests.aWriteIsQueuedAtOnceWhileTheServerHangs Depended on a real address (10.255.255.1), which answers "connection refused" on some networks, so it failed every time here. Replaced by aWriteIsQueuedAtOnceWhileARefreshIsHeld, which holds a fake refresh in flight, submits a write, and checks it is shown and queued before the refresh is released. It uses no socket and no real address.
DownloadedFilesTests deadline loop A hand-rolled 5 s loop replaced with eventuallyAsking.
editor every pin is one height... Checked CSS custom properties and a pin count.
editor the header and the text share one column... Matched regular expressions against style.css.
editor embed label tests Two fixed 20 ms sleeps replaced with vi.waitFor.

Counts

Before After
Swift @Test declarations 870 861
Unit plan test cases passed 985 (1 failed) 978 (0 failed)
Editor tests (vitest) 68 66

The fixed sleeps left in the unit tests are "did not happen" checks with a comment saying so, as AGENTS.md allows.

Tested

  • Unit plan through heavy-run: all 978 cases pass.
  • Editor tests: 66 pass, run three times in a row.
  • Not run: the UI plan (takes over the screen; the UI tests are unchanged) and the Live plan.

Issues

Closes #144.

Closes #64. It does not reproduce. Both tests (aCopyExpiredByAMoveKeepsEveryQueuedWriteAndTheView and aConflictedCopyIsShownBesideItsOriginal) passed 20 of 20 in isolation and in the full Unit plan, on the current Swift SDK (0.0.37). The issue was filed against 0.0.8, 29 releases ago, so the cause was fixed in the package, not in this repository. No test was changed for it.

@aicayzer
aicayzer merged commit daa6ee0 into main Oct 26, 2026
4 checks passed
@aicayzer
aicayzer deleted the chore/prune-tests branch October 26, 2026 11:40
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.

Editor tests stop when WebKit holds back animation frames for a covered test window Resolve failing offline relationship checks

1 participant