v0.33.0 62a09f5

text_input.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"github.com/bnema/dumber/internal/application/port"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockTextInputTarget creates a new instance of MockTextInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockTextInputTarget(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockTextInputTarget {
20	mock := &MockTextInputTarget{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockTextInputTarget is an autogenerated mock type for the TextInputTarget type
29type MockTextInputTarget struct {
30	mock.Mock
31}
32
33type MockTextInputTarget_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockTextInputTarget) EXPECT() *MockTextInputTarget_Expecter {
38	return &MockTextInputTarget_Expecter{mock: &_m.Mock}
39}
40
41// DeleteBeforeCursor provides a mock function for the type MockTextInputTarget
42func (_mock *MockTextInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error {
43	ret := _mock.Called(ctx, n)
44
45	if len(ret) == 0 {
46		panic("no return value specified for DeleteBeforeCursor")
47	}
48
49	var r0 error
50	if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok {
51		r0 = returnFunc(ctx, n)
52	} else {
53		r0 = ret.Error(0)
54	}
55	return r0
56}
57
58// MockTextInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor'
59type MockTextInputTarget_DeleteBeforeCursor_Call struct {
60	*mock.Call
61}
62
63// DeleteBeforeCursor is a helper method to define mock.On call
64//   - ctx context.Context
65//   - n int
66func (_e *MockTextInputTarget_Expecter) DeleteBeforeCursor(ctx any, n any) *MockTextInputTarget_DeleteBeforeCursor_Call {
67	return &MockTextInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)}
68}
69
70func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockTextInputTarget_DeleteBeforeCursor_Call {
71	_c.Call.Run(func(args mock.Arguments) {
72		var arg0 context.Context
73		if args[0] != nil {
74			arg0 = args[0].(context.Context)
75		}
76		var arg1 int
77		if args[1] != nil {
78			arg1 = args[1].(int)
79		}
80		run(
81			arg0,
82			arg1,
83		)
84	})
85	return _c
86}
87
88func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockTextInputTarget_DeleteBeforeCursor_Call {
89	_c.Call.Return(err)
90	return _c
91}
92
93func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockTextInputTarget_DeleteBeforeCursor_Call {
94	_c.Call.Return(run)
95	return _c
96}
97
98// InsertText provides a mock function for the type MockTextInputTarget
99func (_mock *MockTextInputTarget) InsertText(ctx context.Context, text string) error {
100	ret := _mock.Called(ctx, text)
101
102	if len(ret) == 0 {
103		panic("no return value specified for InsertText")
104	}
105
106	var r0 error
107	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
108		r0 = returnFunc(ctx, text)
109	} else {
110		r0 = ret.Error(0)
111	}
112	return r0
113}
114
115// MockTextInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText'
116type MockTextInputTarget_InsertText_Call struct {
117	*mock.Call
118}
119
120// InsertText is a helper method to define mock.On call
121//   - ctx context.Context
122//   - text string
123func (_e *MockTextInputTarget_Expecter) InsertText(ctx any, text any) *MockTextInputTarget_InsertText_Call {
124	return &MockTextInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)}
125}
126
127func (_c *MockTextInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockTextInputTarget_InsertText_Call {
128	_c.Call.Run(func(args mock.Arguments) {
129		var arg0 context.Context
130		if args[0] != nil {
131			arg0 = args[0].(context.Context)
132		}
133		var arg1 string
134		if args[1] != nil {
135			arg1 = args[1].(string)
136		}
137		run(
138			arg0,
139			arg1,
140		)
141	})
142	return _c
143}
144
145func (_c *MockTextInputTarget_InsertText_Call) Return(err error) *MockTextInputTarget_InsertText_Call {
146	_c.Call.Return(err)
147	return _c
148}
149
150func (_c *MockTextInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockTextInputTarget_InsertText_Call {
151	_c.Call.Return(run)
152	return _c
153}
154
155// NewMockFocusable creates a new instance of MockFocusable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
156// The first argument is typically a *testing.T value.
157func NewMockFocusable(t interface {
158	mock.TestingT
159	Cleanup(func())
160}) *MockFocusable {
161	mock := &MockFocusable{}
162	mock.Mock.Test(t)
163
164	t.Cleanup(func() { mock.AssertExpectations(t) })
165
166	return mock
167}
168
169// MockFocusable is an autogenerated mock type for the Focusable type
170type MockFocusable struct {
171	mock.Mock
172}
173
174type MockFocusable_Expecter struct {
175	mock *mock.Mock
176}
177
178func (_m *MockFocusable) EXPECT() *MockFocusable_Expecter {
179	return &MockFocusable_Expecter{mock: &_m.Mock}
180}
181
182// Focus provides a mock function for the type MockFocusable
183func (_mock *MockFocusable) Focus(ctx context.Context) {
184	_mock.Called(ctx)
185	return
186}
187
188// MockFocusable_Focus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Focus'
189type MockFocusable_Focus_Call struct {
190	*mock.Call
191}
192
193// Focus is a helper method to define mock.On call
194//   - ctx context.Context
195func (_e *MockFocusable_Expecter) Focus(ctx any) *MockFocusable_Focus_Call {
196	return &MockFocusable_Focus_Call{Call: _e.mock.On("Focus", ctx)}
197}
198
199func (_c *MockFocusable_Focus_Call) Run(run func(ctx context.Context)) *MockFocusable_Focus_Call {
200	_c.Call.Run(func(args mock.Arguments) {
201		var arg0 context.Context
202		if args[0] != nil {
203			arg0 = args[0].(context.Context)
204		}
205		run(
206			arg0,
207		)
208	})
209	return _c
210}
211
212func (_c *MockFocusable_Focus_Call) Return() *MockFocusable_Focus_Call {
213	_c.Call.Return()
214	return _c
215}
216
217func (_c *MockFocusable_Focus_Call) RunAndReturn(run func(ctx context.Context)) *MockFocusable_Focus_Call {
218	_c.Run(run)
219	return _c
220}
221
222// NewMockEntryInputTarget creates a new instance of MockEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
223// The first argument is typically a *testing.T value.
224func NewMockEntryInputTarget(t interface {
225	mock.TestingT
226	Cleanup(func())
227}) *MockEntryInputTarget {
228	mock := &MockEntryInputTarget{}
229	mock.Mock.Test(t)
230
231	t.Cleanup(func() { mock.AssertExpectations(t) })
232
233	return mock
234}
235
236// MockEntryInputTarget is an autogenerated mock type for the EntryInputTarget type
237type MockEntryInputTarget struct {
238	mock.Mock
239}
240
241type MockEntryInputTarget_Expecter struct {
242	mock *mock.Mock
243}
244
245func (_m *MockEntryInputTarget) EXPECT() *MockEntryInputTarget_Expecter {
246	return &MockEntryInputTarget_Expecter{mock: &_m.Mock}
247}
248
249// DeleteBeforeCursor provides a mock function for the type MockEntryInputTarget
250func (_mock *MockEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error {
251	ret := _mock.Called(ctx, n)
252
253	if len(ret) == 0 {
254		panic("no return value specified for DeleteBeforeCursor")
255	}
256
257	var r0 error
258	if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok {
259		r0 = returnFunc(ctx, n)
260	} else {
261		r0 = ret.Error(0)
262	}
263	return r0
264}
265
266// MockEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor'
267type MockEntryInputTarget_DeleteBeforeCursor_Call struct {
268	*mock.Call
269}
270
271// DeleteBeforeCursor is a helper method to define mock.On call
272//   - ctx context.Context
273//   - n int
274func (_e *MockEntryInputTarget_Expecter) DeleteBeforeCursor(ctx any, n any) *MockEntryInputTarget_DeleteBeforeCursor_Call {
275	return &MockEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)}
276}
277
278func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockEntryInputTarget_DeleteBeforeCursor_Call {
279	_c.Call.Run(func(args mock.Arguments) {
280		var arg0 context.Context
281		if args[0] != nil {
282			arg0 = args[0].(context.Context)
283		}
284		var arg1 int
285		if args[1] != nil {
286			arg1 = args[1].(int)
287		}
288		run(
289			arg0,
290			arg1,
291		)
292	})
293	return _c
294}
295
296func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockEntryInputTarget_DeleteBeforeCursor_Call {
297	_c.Call.Return(err)
298	return _c
299}
300
301func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockEntryInputTarget_DeleteBeforeCursor_Call {
302	_c.Call.Return(run)
303	return _c
304}
305
306// InsertText provides a mock function for the type MockEntryInputTarget
307func (_mock *MockEntryInputTarget) InsertText(ctx context.Context, text string) error {
308	ret := _mock.Called(ctx, text)
309
310	if len(ret) == 0 {
311		panic("no return value specified for InsertText")
312	}
313
314	var r0 error
315	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
316		r0 = returnFunc(ctx, text)
317	} else {
318		r0 = ret.Error(0)
319	}
320	return r0
321}
322
323// MockEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText'
324type MockEntryInputTarget_InsertText_Call struct {
325	*mock.Call
326}
327
328// InsertText is a helper method to define mock.On call
329//   - ctx context.Context
330//   - text string
331func (_e *MockEntryInputTarget_Expecter) InsertText(ctx any, text any) *MockEntryInputTarget_InsertText_Call {
332	return &MockEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)}
333}
334
335func (_c *MockEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockEntryInputTarget_InsertText_Call {
336	_c.Call.Run(func(args mock.Arguments) {
337		var arg0 context.Context
338		if args[0] != nil {
339			arg0 = args[0].(context.Context)
340		}
341		var arg1 string
342		if args[1] != nil {
343			arg1 = args[1].(string)
344		}
345		run(
346			arg0,
347			arg1,
348		)
349	})
350	return _c
351}
352
353func (_c *MockEntryInputTarget_InsertText_Call) Return(err error) *MockEntryInputTarget_InsertText_Call {
354	_c.Call.Return(err)
355	return _c
356}
357
358func (_c *MockEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockEntryInputTarget_InsertText_Call {
359	_c.Call.Return(run)
360	return _c
361}
362
363// IsGTKEntryTarget provides a mock function for the type MockEntryInputTarget
364func (_mock *MockEntryInputTarget) IsGTKEntryTarget() bool {
365	ret := _mock.Called()
366
367	if len(ret) == 0 {
368		panic("no return value specified for IsGTKEntryTarget")
369	}
370
371	var r0 bool
372	if returnFunc, ok := ret.Get(0).(func() bool); ok {
373		r0 = returnFunc()
374	} else {
375		r0 = ret.Get(0).(bool)
376	}
377	return r0
378}
379
380// MockEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget'
381type MockEntryInputTarget_IsGTKEntryTarget_Call struct {
382	*mock.Call
383}
384
385// IsGTKEntryTarget is a helper method to define mock.On call
386func (_e *MockEntryInputTarget_Expecter) IsGTKEntryTarget() *MockEntryInputTarget_IsGTKEntryTarget_Call {
387	return &MockEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")}
388}
389
390func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockEntryInputTarget_IsGTKEntryTarget_Call {
391	_c.Call.Run(func(args mock.Arguments) {
392		run()
393	})
394	return _c
395}
396
397func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockEntryInputTarget_IsGTKEntryTarget_Call {
398	_c.Call.Return(b)
399	return _c
400}
401
402func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockEntryInputTarget_IsGTKEntryTarget_Call {
403	_c.Call.Return(run)
404	return _c
405}
406
407// NewMockFocusedInputProvider creates a new instance of MockFocusedInputProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
408// The first argument is typically a *testing.T value.
409func NewMockFocusedInputProvider(t interface {
410	mock.TestingT
411	Cleanup(func())
412}) *MockFocusedInputProvider {
413	mock := &MockFocusedInputProvider{}
414	mock.Mock.Test(t)
415
416	t.Cleanup(func() { mock.AssertExpectations(t) })
417
418	return mock
419}
420
421// MockFocusedInputProvider is an autogenerated mock type for the FocusedInputProvider type
422type MockFocusedInputProvider struct {
423	mock.Mock
424}
425
426type MockFocusedInputProvider_Expecter struct {
427	mock *mock.Mock
428}
429
430func (_m *MockFocusedInputProvider) EXPECT() *MockFocusedInputProvider_Expecter {
431	return &MockFocusedInputProvider_Expecter{mock: &_m.Mock}
432}
433
434// GetFocusedInput provides a mock function for the type MockFocusedInputProvider
435func (_mock *MockFocusedInputProvider) GetFocusedInput() port.TextInputTarget {
436	ret := _mock.Called()
437
438	if len(ret) == 0 {
439		panic("no return value specified for GetFocusedInput")
440	}
441
442	var r0 port.TextInputTarget
443	if returnFunc, ok := ret.Get(0).(func() port.TextInputTarget); ok {
444		r0 = returnFunc()
445	} else {
446		if ret.Get(0) != nil {
447			r0 = ret.Get(0).(port.TextInputTarget)
448		}
449	}
450	return r0
451}
452
453// MockFocusedInputProvider_GetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFocusedInput'
454type MockFocusedInputProvider_GetFocusedInput_Call struct {
455	*mock.Call
456}
457
458// GetFocusedInput is a helper method to define mock.On call
459func (_e *MockFocusedInputProvider_Expecter) GetFocusedInput() *MockFocusedInputProvider_GetFocusedInput_Call {
460	return &MockFocusedInputProvider_GetFocusedInput_Call{Call: _e.mock.On("GetFocusedInput")}
461}
462
463func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Run(run func()) *MockFocusedInputProvider_GetFocusedInput_Call {
464	_c.Call.Run(func(args mock.Arguments) {
465		run()
466	})
467	return _c
468}
469
470func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Return(textInputTarget port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call {
471	_c.Call.Return(textInputTarget)
472	return _c
473}
474
475func (_c *MockFocusedInputProvider_GetFocusedInput_Call) RunAndReturn(run func() port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call {
476	_c.Call.Return(run)
477	return _c
478}
479
480// SetFocusedInput provides a mock function for the type MockFocusedInputProvider
481func (_mock *MockFocusedInputProvider) SetFocusedInput(target port.TextInputTarget) {
482	_mock.Called(target)
483	return
484}
485
486// MockFocusedInputProvider_SetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusedInput'
487type MockFocusedInputProvider_SetFocusedInput_Call struct {
488	*mock.Call
489}
490
491// SetFocusedInput is a helper method to define mock.On call
492//   - target port.TextInputTarget
493func (_e *MockFocusedInputProvider_Expecter) SetFocusedInput(target any) *MockFocusedInputProvider_SetFocusedInput_Call {
494	return &MockFocusedInputProvider_SetFocusedInput_Call{Call: _e.mock.On("SetFocusedInput", target)}
495}
496
497func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Run(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call {
498	_c.Call.Run(func(args mock.Arguments) {
499		var arg0 port.TextInputTarget
500		if args[0] != nil {
501			arg0 = args[0].(port.TextInputTarget)
502		}
503		run(
504			arg0,
505		)
506	})
507	return _c
508}
509
510func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Return() *MockFocusedInputProvider_SetFocusedInput_Call {
511	_c.Call.Return()
512	return _c
513}
514
515func (_c *MockFocusedInputProvider_SetFocusedInput_Call) RunAndReturn(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call {
516	_c.Run(run)
517	return _c
518}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close