@@ -126,70 +126,70 @@ func TestMonitorsPreviewPane_KeyboardControls(t *testing.T) {
126126 name : "up key moves pan up when panning" ,
127127 setupCmd : tui .StateChangedCmd (tui.AppState {Panning : true }),
128128 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'k' }},
129- expectedPanX : 0 ,
130- expectedPanY : - 100 ,
131- expectedVirtualW : 8000 ,
132- expectedVirtualH : 8000 ,
129+ expectedPanX : 960 ,
130+ expectedPanY : 440 ,
131+ expectedVirtualW : 3456 ,
132+ expectedVirtualH : 3456 ,
133133 },
134134 {
135135 name : "down key moves pan down when panning" ,
136136 setupCmd : tui .StateChangedCmd (tui.AppState {Panning : true }),
137137 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'j' }},
138- expectedPanX : 0 ,
139- expectedPanY : 100 ,
140- expectedVirtualW : 8000 ,
141- expectedVirtualH : 8000 ,
138+ expectedPanX : 960 ,
139+ expectedPanY : 640 ,
140+ expectedVirtualW : 3456 ,
141+ expectedVirtualH : 3456 ,
142142 },
143143 {
144144 name : "left key moves pan left when panning" ,
145145 setupCmd : tui .StateChangedCmd (tui.AppState {Panning : true }),
146146 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'h' }},
147- expectedPanX : - 100 ,
148- expectedPanY : 0 ,
149- expectedVirtualW : 8000 ,
150- expectedVirtualH : 8000 ,
147+ expectedPanX : 860 ,
148+ expectedPanY : 540 ,
149+ expectedVirtualW : 3456 ,
150+ expectedVirtualH : 3456 ,
151151 },
152152 {
153153 name : "right key moves pan right when panning" ,
154154 setupCmd : tui .StateChangedCmd (tui.AppState {Panning : true }),
155155 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'l' }},
156- expectedPanX : 100 ,
157- expectedPanY : 0 ,
158- expectedVirtualW : 8000 ,
159- expectedVirtualH : 8000 ,
156+ expectedPanX : 1060 ,
157+ expectedPanY : 540 ,
158+ expectedVirtualW : 3456 ,
159+ expectedVirtualH : 3456 ,
160160 },
161161 {
162162 name : "up key does nothing when not panning" ,
163163 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'k' }},
164- expectedPanX : 0 ,
165- expectedPanY : 0 ,
166- expectedVirtualW : 8000 ,
167- expectedVirtualH : 8000 ,
164+ expectedPanX : 960 ,
165+ expectedPanY : 540 ,
166+ expectedVirtualW : 3456 ,
167+ expectedVirtualH : 3456 ,
168168 },
169169 {
170170 name : "center key resets pan to 0,0" ,
171171 setupCmd : tui .StateChangedCmd (tui.AppState {Panning : true }),
172172 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'c' }},
173173 expectedPanX : 0 ,
174174 expectedPanY : 0 ,
175- expectedVirtualW : 8000 ,
176- expectedVirtualH : 8000 ,
175+ expectedVirtualW : 3456 ,
176+ expectedVirtualH : 3456 ,
177177 },
178178 {
179179 name : "zoom in decreases virtual dimensions" ,
180180 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'+' }},
181- expectedPanX : 0 ,
182- expectedPanY : 0 ,
183- expectedVirtualW : 7272 ,
184- expectedVirtualH : 7272 ,
181+ expectedPanX : 960 ,
182+ expectedPanY : 540 ,
183+ expectedVirtualW : 3141 ,
184+ expectedVirtualH : 3141 ,
185185 },
186186 {
187187 name : "zoom out increases virtual dimensions" ,
188188 key : tea.KeyMsg {Type : tea .KeyRunes , Runes : []rune {'-' }},
189- expectedPanX : 0 ,
190- expectedPanY : 0 ,
191- expectedVirtualW : 8800 ,
192- expectedVirtualH : 8800 ,
189+ expectedPanX : 960 ,
190+ expectedPanY : 540 ,
191+ expectedVirtualW : 3801 ,
192+ expectedVirtualH : 3801 ,
193193 },
194194 }
195195
0 commit comments