mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-18 03:49:50 -06:00
Add a test for portrait mode with the main view split side by side
If the main view is split side by side, the side panels get only a sixth of the space so that the two panes have more room. In portrait mode the side panels are above the main view, so this makes them lower rather than narrower, and the main view gains no width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54cc6af1d7
commit
fdc2b5be26
1 file changed
+60
@@ -536,6 +536,66 @@ func TestGetWindowDimensions(t *testing.T) {
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "portrait mode, main view split side by side",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
args.Width = 50
|
||||
args.Height = 20
|
||||
args.UserConfig.Gui.PortraitMode = "always"
|
||||
args.UserConfig.Gui.MainPanelSplitMode = "horizontal"
|
||||
args.MainPanes = types.BothMainPanes
|
||||
},
|
||||
/* EXPECTED:
|
||||
expected: `
|
||||
<status──────────────────────────────────────────>
|
||||
╭files───────────────────────────────────────────╮
|
||||
│ │
|
||||
╰────────────────────────────────────────────────╯
|
||||
<branches────────────────────────────────────────>
|
||||
<commits─────────────────────────────────────────>
|
||||
<stash───────────────────────────────────────────>
|
||||
╭main───────────────────╮╭secondary──────────────╮
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰───────────────────────╯╰───────────────────────╯
|
||||
<options─────────────────────────────>A<B────────>
|
||||
A: statusSpacer1
|
||||
B: information
|
||||
`,
|
||||
ACTUAL: */
|
||||
expected: `
|
||||
<status──────────────────────────────────────────>
|
||||
<fileshes────────────────────────────────────────>
|
||||
<commits─────────────────────────────────────────>
|
||||
<stash───────────────────────────────────────────>
|
||||
╭main───────────────────╮╭secondary──────────────╮
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰───────────────────────╯╰───────────────────────╯
|
||||
<options─────────────────────────────>A<B────────>
|
||||
A: statusSpacer1
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "portrait auto mode, disabled because width is too large",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
|
||||
Reference in new issue
Block a user