@@ -46,10 +46,10 @@ describe('routes/Settings.tsx', () => {
46
46
47
47
it ( 'should press the logout' , async ( ) => {
48
48
const logoutMock = jest . fn ( ) ;
49
- let getByLabelText ;
49
+ let getByTitle ;
50
50
51
51
await act ( async ( ) => {
52
- const { getByLabelText : getByLabelTextLocal } = render (
52
+ const { getByTitle : getByLabelTextLocal } = render (
53
53
< AppContext . Provider
54
54
value = { {
55
55
settings : mockSettings ,
@@ -63,10 +63,10 @@ describe('routes/Settings.tsx', () => {
63
63
</ AppContext . Provider > ,
64
64
) ;
65
65
66
- getByLabelText = getByLabelTextLocal ;
66
+ getByTitle = getByLabelTextLocal ;
67
67
} ) ;
68
68
69
- fireEvent . click ( getByLabelText ( 'Logout' ) ) ;
69
+ fireEvent . click ( getByTitle ( 'Logout' ) ) ;
70
70
71
71
expect ( logoutMock ) . toHaveBeenCalledTimes ( 1 ) ;
72
72
@@ -299,10 +299,10 @@ describe('routes/Settings.tsx', () => {
299
299
} ) ;
300
300
301
301
it ( 'should go to the enterprise login route' , async ( ) => {
302
- let getByLabelText ;
302
+ let getByTitle ;
303
303
304
304
await act ( async ( ) => {
305
- const { getByLabelText : getByLabelTextLocal } = render (
305
+ const { getByTitle : getByTitleLocal } = render (
306
306
< AppContext . Provider
307
307
value = { {
308
308
settings : mockSettings ,
@@ -314,20 +314,20 @@ describe('routes/Settings.tsx', () => {
314
314
</ MemoryRouter >
315
315
</ AppContext . Provider > ,
316
316
) ;
317
- getByLabelText = getByLabelTextLocal ;
317
+ getByTitle = getByTitleLocal ;
318
318
} ) ;
319
319
320
- fireEvent . click ( getByLabelText ( 'Login with GitHub Enterprise' ) ) ;
320
+ fireEvent . click ( getByTitle ( 'Login with GitHub Enterprise' ) ) ;
321
321
expect ( mockNavigate ) . toHaveBeenNthCalledWith ( 1 , '/login-enterprise' , {
322
322
replace : true ,
323
323
} ) ;
324
324
} ) ;
325
325
326
326
it ( 'should quit the app' , async ( ) => {
327
- let getByLabelText ;
327
+ let getByTitle ;
328
328
329
329
await act ( async ( ) => {
330
- const { getByLabelText : getByLabelTextLocal } = render (
330
+ const { getByTitle : getByTitleLocal } = render (
331
331
< AppContext . Provider
332
332
value = { { settings : mockSettings , accounts : mockAccounts } }
333
333
>
@@ -336,10 +336,10 @@ describe('routes/Settings.tsx', () => {
336
336
</ MemoryRouter >
337
337
</ AppContext . Provider > ,
338
338
) ;
339
- getByLabelText = getByLabelTextLocal ;
339
+ getByTitle = getByTitleLocal ;
340
340
} ) ;
341
341
342
- fireEvent . click ( getByLabelText ( 'Quit Gitify' ) ) ;
342
+ fireEvent . click ( getByTitle ( 'Quit Gitify' ) ) ;
343
343
expect ( ipcRenderer . send ) . toHaveBeenCalledWith ( 'app-quit' ) ;
344
344
} ) ;
345
345
0 commit comments