Repository navigation
test: dock layout cases under a floating and a tiling window manager (Refs #5230) - #5359
Merged
Merged
Conversation
…(Refs #5230) Step 1 of the dock layout rewrite (#5230): a test harness that runs each dock case under two scripted window-manager profiles, and tests for what works today. - floating: the window changes size only when the case asks for it. - tiling: the window starts in a small tile and is retiled twice (#3740), a floated dock is a new window and halves the tile at once (#5230), and another window that opens or closes retiles it. Each case must give what the user expects under both profiles, and both profiles must save the same layout (compared in one full-size reference window). The code under test does not know which profile runs. Cases: E1/E4 unchanged layout, E2 narrow then wide, E3 quit narrow, E9 float a dock (placement only: under tiling, quit saves the row squeezed into the half tile, P7, a RED case of step 3), E10 dock at its minimum, E11 all docks hidden, E13 current tab of a tab group, E14 plugin dock added after the restore (lands in the plugin's area, as upstream), E23 quit while hidden, E25 round trip with a layout written by plain Qt. No production change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #5230 (step 1 of the plan in #5230 (comment))
Problem
The dock layout fixes so far were tested under one window behavior at a time. A fix for a tiling window manager (#4841) broke a case on a floating one (#5230). The rewrite needs tests that run every case under both.
Change
Test only, in
test/cmocka/test_dock_state_restart.cpp(same binary). No production change.Sessionwith two scripted window-manager profiles:toggleViewAction,setFloating, Reset Docks asOBSBasic::on_resetDocks_triggereddoes it, quit throughStateToSave(),config_save_safeand a reopen.Results (edge cases of the spec)
P7 (new): under the tiling profile, floating a dock halves the tile at the same time. The helper takes that as the user's layout, and quit saves the row as squeezed into the half tile. The next full-size start gives one dock all the extra width: 1096/295/197 px, where the floating profile keeps the shares, 597/595/396 px. It joins P2, P4, P5 and P6 as a RED case of step 3, so this PR does not assert it.
Tests
test_dock_state_restarton build-rust (Ubuntu 26.04 container, the published Qt testlib asset,ci/linux_qt_frontend.py, the CI Qt job): the job passes, 30 Qt tests. The binary alone: 20/20 cases, 15 runs in a row green (10 before E14 was added, 5 on the final commit).No features.md line (test-only change).
🤖 Generated with Claude Code