v0.30.0 eb3068f

context_menu.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// NewMockContextMenuBuilder creates a new instance of MockContextMenuBuilder. 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 NewMockContextMenuBuilder(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockContextMenuBuilder {
20	mock := &MockContextMenuBuilder{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockContextMenuBuilder is an autogenerated mock type for the ContextMenuBuilder type
29type MockContextMenuBuilder struct {
30	mock.Mock
31}
32
33type MockContextMenuBuilder_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockContextMenuBuilder) EXPECT() *MockContextMenuBuilder_Expecter {
38	return &MockContextMenuBuilder_Expecter{mock: &_m.Mock}
39}
40
41// Build provides a mock function for the type MockContextMenuBuilder
42func (_mock *MockContextMenuBuilder) Build(ctx context.Context, menuContext port.MenuContext) []port.MenuItem {
43	ret := _mock.Called(ctx, menuContext)
44
45	if len(ret) == 0 {
46		panic("no return value specified for Build")
47	}
48
49	var r0 []port.MenuItem
50	if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuContext) []port.MenuItem); ok {
51		r0 = returnFunc(ctx, menuContext)
52	} else {
53		if ret.Get(0) != nil {
54			r0 = ret.Get(0).([]port.MenuItem)
55		}
56	}
57	return r0
58}
59
60// MockContextMenuBuilder_Build_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Build'
61type MockContextMenuBuilder_Build_Call struct {
62	*mock.Call
63}
64
65// Build is a helper method to define mock.On call
66//   - ctx context.Context
67//   - menuContext port.MenuContext
68func (_e *MockContextMenuBuilder_Expecter) Build(ctx any, menuContext any) *MockContextMenuBuilder_Build_Call {
69	return &MockContextMenuBuilder_Build_Call{Call: _e.mock.On("Build", ctx, menuContext)}
70}
71
72func (_c *MockContextMenuBuilder_Build_Call) Run(run func(ctx context.Context, menuContext port.MenuContext)) *MockContextMenuBuilder_Build_Call {
73	_c.Call.Run(func(args mock.Arguments) {
74		var arg0 context.Context
75		if args[0] != nil {
76			arg0 = args[0].(context.Context)
77		}
78		var arg1 port.MenuContext
79		if args[1] != nil {
80			arg1 = args[1].(port.MenuContext)
81		}
82		run(
83			arg0,
84			arg1,
85		)
86	})
87	return _c
88}
89
90func (_c *MockContextMenuBuilder_Build_Call) Return(menuItems []port.MenuItem) *MockContextMenuBuilder_Build_Call {
91	_c.Call.Return(menuItems)
92	return _c
93}
94
95func (_c *MockContextMenuBuilder_Build_Call) RunAndReturn(run func(ctx context.Context, menuContext port.MenuContext) []port.MenuItem) *MockContextMenuBuilder_Build_Call {
96	_c.Call.Return(run)
97	return _c
98}
99
100// NewMockContextMenuActionExecutor creates a new instance of MockContextMenuActionExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
101// The first argument is typically a *testing.T value.
102func NewMockContextMenuActionExecutor(t interface {
103	mock.TestingT
104	Cleanup(func())
105}) *MockContextMenuActionExecutor {
106	mock := &MockContextMenuActionExecutor{}
107	mock.Mock.Test(t)
108
109	t.Cleanup(func() { mock.AssertExpectations(t) })
110
111	return mock
112}
113
114// MockContextMenuActionExecutor is an autogenerated mock type for the ContextMenuActionExecutor type
115type MockContextMenuActionExecutor struct {
116	mock.Mock
117}
118
119type MockContextMenuActionExecutor_Expecter struct {
120	mock *mock.Mock
121}
122
123func (_m *MockContextMenuActionExecutor) EXPECT() *MockContextMenuActionExecutor_Expecter {
124	return &MockContextMenuActionExecutor_Expecter{mock: &_m.Mock}
125}
126
127// ExecuteMenuAction provides a mock function for the type MockContextMenuActionExecutor
128func (_mock *MockContextMenuActionExecutor) ExecuteMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error {
129	ret := _mock.Called(ctx, action, menuContext)
130
131	if len(ret) == 0 {
132		panic("no return value specified for ExecuteMenuAction")
133	}
134
135	var r0 error
136	if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok {
137		r0 = returnFunc(ctx, action, menuContext)
138	} else {
139		r0 = ret.Error(0)
140	}
141	return r0
142}
143
144// MockContextMenuActionExecutor_ExecuteMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteMenuAction'
145type MockContextMenuActionExecutor_ExecuteMenuAction_Call struct {
146	*mock.Call
147}
148
149// ExecuteMenuAction is a helper method to define mock.On call
150//   - ctx context.Context
151//   - action port.MenuAction
152//   - menuContext port.MenuContext
153func (_e *MockContextMenuActionExecutor_Expecter) ExecuteMenuAction(ctx any, action any, menuContext any) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
154	return &MockContextMenuActionExecutor_ExecuteMenuAction_Call{Call: _e.mock.On("ExecuteMenuAction", ctx, action, menuContext)}
155}
156
157func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
158	_c.Call.Run(func(args mock.Arguments) {
159		var arg0 context.Context
160		if args[0] != nil {
161			arg0 = args[0].(context.Context)
162		}
163		var arg1 port.MenuAction
164		if args[1] != nil {
165			arg1 = args[1].(port.MenuAction)
166		}
167		var arg2 port.MenuContext
168		if args[2] != nil {
169			arg2 = args[2].(port.MenuContext)
170		}
171		run(
172			arg0,
173			arg1,
174			arg2,
175		)
176	})
177	return _c
178}
179
180func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Return(err error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
181	_c.Call.Return(err)
182	return _c
183}
184
185func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
186	_c.Call.Return(run)
187	return _c
188}
189
190// NewMockContextMenuActionExecutorFactory creates a new instance of MockContextMenuActionExecutorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
191// The first argument is typically a *testing.T value.
192func NewMockContextMenuActionExecutorFactory(t interface {
193	mock.TestingT
194	Cleanup(func())
195}) *MockContextMenuActionExecutorFactory {
196	mock := &MockContextMenuActionExecutorFactory{}
197	mock.Mock.Test(t)
198
199	t.Cleanup(func() { mock.AssertExpectations(t) })
200
201	return mock
202}
203
204// MockContextMenuActionExecutorFactory is an autogenerated mock type for the ContextMenuActionExecutorFactory type
205type MockContextMenuActionExecutorFactory struct {
206	mock.Mock
207}
208
209type MockContextMenuActionExecutorFactory_Expecter struct {
210	mock *mock.Mock
211}
212
213func (_m *MockContextMenuActionExecutorFactory) EXPECT() *MockContextMenuActionExecutorFactory_Expecter {
214	return &MockContextMenuActionExecutorFactory_Expecter{mock: &_m.Mock}
215}
216
217// NewContextMenuActionExecutor provides a mock function for the type MockContextMenuActionExecutorFactory
218func (_mock *MockContextMenuActionExecutorFactory) NewContextMenuActionExecutor(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor {
219	ret := _mock.Called(clipboard, resolver, saver, delegator)
220
221	if len(ret) == 0 {
222		panic("no return value specified for NewContextMenuActionExecutor")
223	}
224
225	var r0 port.ContextMenuActionExecutor
226	if returnFunc, ok := ret.Get(0).(func(port.Clipboard, port.ImageDataResolver, port.ResolvedImageSaver, port.MenuActionDelegator) port.ContextMenuActionExecutor); ok {
227		r0 = returnFunc(clipboard, resolver, saver, delegator)
228	} else {
229		if ret.Get(0) != nil {
230			r0 = ret.Get(0).(port.ContextMenuActionExecutor)
231		}
232	}
233	return r0
234}
235
236// MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContextMenuActionExecutor'
237type MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call struct {
238	*mock.Call
239}
240
241// NewContextMenuActionExecutor is a helper method to define mock.On call
242//   - clipboard port.Clipboard
243//   - resolver port.ImageDataResolver
244//   - saver port.ResolvedImageSaver
245//   - delegator port.MenuActionDelegator
246func (_e *MockContextMenuActionExecutorFactory_Expecter) NewContextMenuActionExecutor(clipboard any, resolver any, saver any, delegator any) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
247	return &MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call{Call: _e.mock.On("NewContextMenuActionExecutor", clipboard, resolver, saver, delegator)}
248}
249
250func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Run(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator)) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
251	_c.Call.Run(func(args mock.Arguments) {
252		var arg0 port.Clipboard
253		if args[0] != nil {
254			arg0 = args[0].(port.Clipboard)
255		}
256		var arg1 port.ImageDataResolver
257		if args[1] != nil {
258			arg1 = args[1].(port.ImageDataResolver)
259		}
260		var arg2 port.ResolvedImageSaver
261		if args[2] != nil {
262			arg2 = args[2].(port.ResolvedImageSaver)
263		}
264		var arg3 port.MenuActionDelegator
265		if args[3] != nil {
266			arg3 = args[3].(port.MenuActionDelegator)
267		}
268		run(
269			arg0,
270			arg1,
271			arg2,
272			arg3,
273		)
274	})
275	return _c
276}
277
278func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Return(contextMenuActionExecutor port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
279	_c.Call.Return(contextMenuActionExecutor)
280	return _c
281}
282
283func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) RunAndReturn(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
284	_c.Call.Return(run)
285	return _c
286}
287
288// NewMockMenuActionDelegator creates a new instance of MockMenuActionDelegator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
289// The first argument is typically a *testing.T value.
290func NewMockMenuActionDelegator(t interface {
291	mock.TestingT
292	Cleanup(func())
293}) *MockMenuActionDelegator {
294	mock := &MockMenuActionDelegator{}
295	mock.Mock.Test(t)
296
297	t.Cleanup(func() { mock.AssertExpectations(t) })
298
299	return mock
300}
301
302// MockMenuActionDelegator is an autogenerated mock type for the MenuActionDelegator type
303type MockMenuActionDelegator struct {
304	mock.Mock
305}
306
307type MockMenuActionDelegator_Expecter struct {
308	mock *mock.Mock
309}
310
311func (_m *MockMenuActionDelegator) EXPECT() *MockMenuActionDelegator_Expecter {
312	return &MockMenuActionDelegator_Expecter{mock: &_m.Mock}
313}
314
315// DelegateMenuAction provides a mock function for the type MockMenuActionDelegator
316func (_mock *MockMenuActionDelegator) DelegateMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error {
317	ret := _mock.Called(ctx, action, menuContext)
318
319	if len(ret) == 0 {
320		panic("no return value specified for DelegateMenuAction")
321	}
322
323	var r0 error
324	if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok {
325		r0 = returnFunc(ctx, action, menuContext)
326	} else {
327		r0 = ret.Error(0)
328	}
329	return r0
330}
331
332// MockMenuActionDelegator_DelegateMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegateMenuAction'
333type MockMenuActionDelegator_DelegateMenuAction_Call struct {
334	*mock.Call
335}
336
337// DelegateMenuAction is a helper method to define mock.On call
338//   - ctx context.Context
339//   - action port.MenuAction
340//   - menuContext port.MenuContext
341func (_e *MockMenuActionDelegator_Expecter) DelegateMenuAction(ctx any, action any, menuContext any) *MockMenuActionDelegator_DelegateMenuAction_Call {
342	return &MockMenuActionDelegator_DelegateMenuAction_Call{Call: _e.mock.On("DelegateMenuAction", ctx, action, menuContext)}
343}
344
345func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockMenuActionDelegator_DelegateMenuAction_Call {
346	_c.Call.Run(func(args mock.Arguments) {
347		var arg0 context.Context
348		if args[0] != nil {
349			arg0 = args[0].(context.Context)
350		}
351		var arg1 port.MenuAction
352		if args[1] != nil {
353			arg1 = args[1].(port.MenuAction)
354		}
355		var arg2 port.MenuContext
356		if args[2] != nil {
357			arg2 = args[2].(port.MenuContext)
358		}
359		run(
360			arg0,
361			arg1,
362			arg2,
363		)
364	})
365	return _c
366}
367
368func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Return(err error) *MockMenuActionDelegator_DelegateMenuAction_Call {
369	_c.Call.Return(err)
370	return _c
371}
372
373func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockMenuActionDelegator_DelegateMenuAction_Call {
374	_c.Call.Return(run)
375	return _c
376}

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