Repository navigation
test(nsgo): run the client's suite in a real window and keep its pictures - #277
Merged
Merged
Conversation
…ures Frostnotes' part of Phase 0.5 of frostmail's plan 0016. The NSGo client's suite ran headless only, where NSGo models the views and draws no pixel. - TestMain starts NSGo's test host, so `go tool nsgo test -target linux` runs the same tests in a GTK 4 window. `make nsgo-live` does that under Xvfb; CI's Verify job runs it after `make verify` and uploads its pictures. - 8 picture tours name a picture at each main view on a hand-written vault. cmd/frostnotes-nsgo/comparison/linux keeps 19 of today's look, the "before" set; `make nsgo-pictures` takes them again. The tours pin light or dark, and a GTK settings file stops the caret's blinking: 3 takes on 1 host gave the same bytes. - The tests find the repository from any working directory: on a target it is not the package's. - GDK_BACKEND=x11 keeps the windows on Xvfb. With only WAYLAND_DISPLAY unset, GTK still opened the desktop's compositor at wayland-0. Unchanged, 3 of the 4 workflows passed headless and failed in the window. All 12 tests now pass in both, and none skips: - A wait does not move the app's clock on a target, so vault search's debounce and the session's dial after a dropped connection never came due. waitTimers moves the clock while it waits. - NSGo's Linux test host drops a line break typed in a text view. typeLines enters the text as an input method's commit there. - App.Paste skips a test on a target. TestSwitchNoteDuringAutosave leaves out its paste and the undo after it there, and runs its other steps.
Merged
4 tasks done
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The NSGo client's suite also runs in a real window, and the repository keeps pictures of today's look, before any look changes. It is Frostnotes' part of Phase 0.5 of the plan for one look across the three NSGo apps (frostyard/frostmail, plan 0016); FrostMail's part is frostyard/frostmail#390. Until now the suite ran headless only, where NSGo models the views and draws no pixel.
TestMainstarts NSGo's test host, sogo tool nsgo test -target linuxruns the same tests in a GTK 4 window.make nsgo-livedoes that under Xvfb. The Verify job runs it aftermake verifyand uploads the pictures it drew asnsgo-live-pictures.cmd/frostnotes-nsgo/comparison/linuxkeeps 19 of today's look (852 KB): the empty state, a note as source and as live preview, 4 dialogs, quick open, vault search, the vault manager and the join form, the no-vault state, 3 narrow views and 2 in the dark appearance.make nsgo-picturestakes them again; 3 takes gave the same bytes. No test compares pixels.docs/design/app.mdhas the section "The NSGo client's live suite";AGENTS.mdlists the gates.What the real window showed
With only
TestMainand a path fix, 3 of the 4 existing workflows failed in the window and passed headless. All 3 are differences of NSGo v0.3.0's test host, not of the app; no app code and no assertion changes.waitTimersadvances the clock between checks, in both runs.typeLinescommits the text on a target and types it headless.App.Pasteskips the whole test on a target.TestSwitchNoteDuringAutosaveleaves out the paste and its undo there (headlessStep) and runs every other step. It is the one step that stays headless-only.Now 12 tests (4 workflows, 8 tours) pass headless and in the window, and none skips.
Two faults the pictures show, recorded in the design doc and not fixed here:
dark-narrow-note.png): the compact shell paints no ground, so light text sits on white. The fix belongs in the shared kit (frostui'sworkspaceui).GTK on Xvfb
NSGO_LIVEsetsGDK_BACKEND=x11. UnsettingWAYLAND_DISPLAYis not enough: GTK tries Wayland first and finds a desktop's compositor at the default socket. frostyard/frostmail#394 makes the same fix there.Risk tier
Risk tier: 3 — the change matches L2 paths.
.github/workflows/**(ci.yml): the Verify job gains 3 steps aftermake verify: anapt-get installof the window runtime (the list frostmail's NSGo job installs, which passed on a runner there),make nsgo-live, andactions/upload-artifactat the SHA this repository already pins. The job's permissions do not change. It adds the live suite's time to Verify, which is not measured on a runner yet.Makefile: 2 new targets,nsgo-liveandnsgo-pictures. No existing target changes.Docs housekeeping
Verification
make checkgreen (host, exit 0)make nsgo-checkgreen (host), the js/wasm build includedmake nsgo-livegreen (host, Xvfb's X11), run by two sessions: 12 passed, 0 failed, 0 skipped# vX.Y.Z,permissions: {}, andpersist-credentials: falsemake ci, and the pictures on any host but this one.It touches
ci.ymland the Makefile, as #276 does; a trial merge of the two was clean.