v0.30.0 eb3068f

browser_launch.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	"io"
10
11	"github.com/bnema/dumber/internal/application/port"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockBrowserWindowOpener creates a new instance of MockBrowserWindowOpener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMockBrowserWindowOpener(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *MockBrowserWindowOpener {
21	mock := &MockBrowserWindowOpener{}
22	mock.Mock.Test(t)
23
24	t.Cleanup(func() { mock.AssertExpectations(t) })
25
26	return mock
27}
28
29// MockBrowserWindowOpener is an autogenerated mock type for the BrowserWindowOpener type
30type MockBrowserWindowOpener struct {
31	mock.Mock
32}
33
34type MockBrowserWindowOpener_Expecter struct {
35	mock *mock.Mock
36}
37
38func (_m *MockBrowserWindowOpener) EXPECT() *MockBrowserWindowOpener_Expecter {
39	return &MockBrowserWindowOpener_Expecter{mock: &_m.Mock}
40}
41
42// OpenFreshWindow provides a mock function for the type MockBrowserWindowOpener
43func (_mock *MockBrowserWindowOpener) OpenFreshWindow(ctx context.Context, url string) error {
44	ret := _mock.Called(ctx, url)
45
46	if len(ret) == 0 {
47		panic("no return value specified for OpenFreshWindow")
48	}
49
50	var r0 error
51	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
52		r0 = returnFunc(ctx, url)
53	} else {
54		r0 = ret.Error(0)
55	}
56	return r0
57}
58
59// MockBrowserWindowOpener_OpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFreshWindow'
60type MockBrowserWindowOpener_OpenFreshWindow_Call struct {
61	*mock.Call
62}
63
64// OpenFreshWindow is a helper method to define mock.On call
65//   - ctx context.Context
66//   - url string
67func (_e *MockBrowserWindowOpener_Expecter) OpenFreshWindow(ctx any, url any) *MockBrowserWindowOpener_OpenFreshWindow_Call {
68	return &MockBrowserWindowOpener_OpenFreshWindow_Call{Call: _e.mock.On("OpenFreshWindow", ctx, url)}
69}
70
71func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserWindowOpener_OpenFreshWindow_Call {
72	_c.Call.Run(func(args mock.Arguments) {
73		var arg0 context.Context
74		if args[0] != nil {
75			arg0 = args[0].(context.Context)
76		}
77		var arg1 string
78		if args[1] != nil {
79			arg1 = args[1].(string)
80		}
81		run(
82			arg0,
83			arg1,
84		)
85	})
86	return _c
87}
88
89func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Return(err error) *MockBrowserWindowOpener_OpenFreshWindow_Call {
90	_c.Call.Return(err)
91	return _c
92}
93
94func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockBrowserWindowOpener_OpenFreshWindow_Call {
95	_c.Call.Return(run)
96	return _c
97}
98
99// NewMockBrowserLaunchRelay creates a new instance of MockBrowserLaunchRelay. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
100// The first argument is typically a *testing.T value.
101func NewMockBrowserLaunchRelay(t interface {
102	mock.TestingT
103	Cleanup(func())
104}) *MockBrowserLaunchRelay {
105	mock := &MockBrowserLaunchRelay{}
106	mock.Mock.Test(t)
107
108	t.Cleanup(func() { mock.AssertExpectations(t) })
109
110	return mock
111}
112
113// MockBrowserLaunchRelay is an autogenerated mock type for the BrowserLaunchRelay type
114type MockBrowserLaunchRelay struct {
115	mock.Mock
116}
117
118type MockBrowserLaunchRelay_Expecter struct {
119	mock *mock.Mock
120}
121
122func (_m *MockBrowserLaunchRelay) EXPECT() *MockBrowserLaunchRelay_Expecter {
123	return &MockBrowserLaunchRelay_Expecter{mock: &_m.Mock}
124}
125
126// DeliverOpenFreshWindow provides a mock function for the type MockBrowserLaunchRelay
127func (_mock *MockBrowserLaunchRelay) DeliverOpenFreshWindow(ctx context.Context, url string) (bool, error) {
128	ret := _mock.Called(ctx, url)
129
130	if len(ret) == 0 {
131		panic("no return value specified for DeliverOpenFreshWindow")
132	}
133
134	var r0 bool
135	var r1 error
136	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
137		return returnFunc(ctx, url)
138	}
139	if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
140		r0 = returnFunc(ctx, url)
141	} else {
142		r0 = ret.Get(0).(bool)
143	}
144	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
145		r1 = returnFunc(ctx, url)
146	} else {
147		r1 = ret.Error(1)
148	}
149	return r0, r1
150}
151
152// MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverOpenFreshWindow'
153type MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call struct {
154	*mock.Call
155}
156
157// DeliverOpenFreshWindow is a helper method to define mock.On call
158//   - ctx context.Context
159//   - url string
160func (_e *MockBrowserLaunchRelay_Expecter) DeliverOpenFreshWindow(ctx any, url any) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
161	return &MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call{Call: _e.mock.On("DeliverOpenFreshWindow", ctx, url)}
162}
163
164func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
165	_c.Call.Run(func(args mock.Arguments) {
166		var arg0 context.Context
167		if args[0] != nil {
168			arg0 = args[0].(context.Context)
169		}
170		var arg1 string
171		if args[1] != nil {
172			arg1 = args[1].(string)
173		}
174		run(
175			arg0,
176			arg1,
177		)
178	})
179	return _c
180}
181
182func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Return(b bool, err error) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
183	_c.Call.Return(b, err)
184	return _c
185}
186
187func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) (bool, error)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
188	_c.Call.Return(run)
189	return _c
190}
191
192// Listen provides a mock function for the type MockBrowserLaunchRelay
193func (_mock *MockBrowserLaunchRelay) Listen(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error) {
194	ret := _mock.Called(ctx, opener)
195
196	if len(ret) == 0 {
197		panic("no return value specified for Listen")
198	}
199
200	var r0 io.Closer
201	var r1 error
202	if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) (io.Closer, error)); ok {
203		return returnFunc(ctx, opener)
204	}
205	if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) io.Closer); ok {
206		r0 = returnFunc(ctx, opener)
207	} else {
208		if ret.Get(0) != nil {
209			r0 = ret.Get(0).(io.Closer)
210		}
211	}
212	if returnFunc, ok := ret.Get(1).(func(context.Context, port.BrowserWindowOpener) error); ok {
213		r1 = returnFunc(ctx, opener)
214	} else {
215		r1 = ret.Error(1)
216	}
217	return r0, r1
218}
219
220// MockBrowserLaunchRelay_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'
221type MockBrowserLaunchRelay_Listen_Call struct {
222	*mock.Call
223}
224
225// Listen is a helper method to define mock.On call
226//   - ctx context.Context
227//   - opener port.BrowserWindowOpener
228func (_e *MockBrowserLaunchRelay_Expecter) Listen(ctx any, opener any) *MockBrowserLaunchRelay_Listen_Call {
229	return &MockBrowserLaunchRelay_Listen_Call{Call: _e.mock.On("Listen", ctx, opener)}
230}
231
232func (_c *MockBrowserLaunchRelay_Listen_Call) Run(run func(ctx context.Context, opener port.BrowserWindowOpener)) *MockBrowserLaunchRelay_Listen_Call {
233	_c.Call.Run(func(args mock.Arguments) {
234		var arg0 context.Context
235		if args[0] != nil {
236			arg0 = args[0].(context.Context)
237		}
238		var arg1 port.BrowserWindowOpener
239		if args[1] != nil {
240			arg1 = args[1].(port.BrowserWindowOpener)
241		}
242		run(
243			arg0,
244			arg1,
245		)
246	})
247	return _c
248}
249
250func (_c *MockBrowserLaunchRelay_Listen_Call) Return(closer io.Closer, err error) *MockBrowserLaunchRelay_Listen_Call {
251	_c.Call.Return(closer, err)
252	return _c
253}
254
255func (_c *MockBrowserLaunchRelay_Listen_Call) RunAndReturn(run func(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error)) *MockBrowserLaunchRelay_Listen_Call {
256	_c.Call.Return(run)
257	return _c
258}

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