Repository navigation
Conversation
The end-to-end test compares the screenshot with the window size read when the app connects. A revealed menu bar shortens the window content during the test, so the capture is 25 px shorter and the test fails although it covers the window. Read the window size just before the screenshot so both describe the same moment.
|
This pull request has no valid
Run the checks on the head commit, fill the block in the template, then push or edit the body: this label and comment update on their own. |
2 tasks
This branch has not been deployed
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
TestLinuxAutomationEndToEndreads the window list once, right after the app connects, and later compares the screenshot against that size. The window changes size during the test: revealing the auto-hiding menu bar for theActions > Resetstep shortens the window content by the bar's height, and the engine lays the view out again. On such a run the capture is 480x615 while the stored size is 480x640, so the test fails although the screenshot covers the window. In CI this is the intermittentscreenshot size 480x615 of window {... Height:640 ...}failure.The test now reads the window size again just before the screenshot, so both describe the same moment.
Fixes #2819.
Targets
core,base,ui,tsx, thensgotool)Screenshots
None
Verification
0f2cf5bb4ad0a10710d3c4fNSGO_AUTOMATION_E2E=1 GDK_BACKEND=x11 GSK_RENDERER=cairo GTK_A11Y=none xvfb-run -a dbus-run-session -- go tool nsgo test -run '^TestLinuxAutomationEndToEnd$' ./cmd/nsgo -- -count=1before the change, in an Ubuntu 24.04 container withlibgtk-4-14.14.5+ds-0ubuntu0.10 (the versiontest.ymlinstalls) → 1 failed, twice:screenshot size 480x615 of window {ID:1 Graph:1 Title:Automation Kind:window Width:480 Height:640 Default:true}: <nil>Width:480 Height:615, so the capture agrees with the window and only the stored size was stalego tool nsgo check -target linux_x64 -jobs 2→ 0gofmt -l cmd/nsgo/automation_e2e_linux_test.go→ no outputpassChecklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md. Nothing a user sees changes: this is test code.🤖 Generated with Claude Code