11import { fireEvent , render , screen } from '@testing-library/react' ;
22import { shell } from 'electron' ;
3- import { mockAccounts , mockSettings } from '../__mocks__/mock-state' ;
4- import { mockedSingleNotification } from '../__mocks__/mockedData' ;
3+ import { mockAccounts , mockSettings } from '../__mocks__/state-mocks' ;
54import { AppContext } from '../context/App' ;
65import type { UserType } from '../typesGitHub' ;
6+ import { mockSingleNotification } from '../utils/api/__mocks__/response-mocks' ;
77import * as helpers from '../utils/helpers' ;
88import { NotificationRow } from './NotificationRow' ;
99
@@ -22,7 +22,7 @@ describe('components/NotificationRow.tsx', () => {
2222 . mockImplementation ( ( ) => new Date ( '2024' ) . valueOf ( ) ) ;
2323
2424 const props = {
25- notification : mockedSingleNotification ,
25+ notification : mockSingleNotification ,
2626 hostname : 'github.com' ,
2727 } ;
2828
@@ -35,7 +35,7 @@ describe('components/NotificationRow.tsx', () => {
3535 . spyOn ( global . Date , 'now' )
3636 . mockImplementation ( ( ) => new Date ( '2024' ) . valueOf ( ) ) ;
3737
38- const mockNotification = mockedSingleNotification ;
38+ const mockNotification = mockSingleNotification ;
3939 mockNotification . last_read_at = null ;
4040
4141 const props = {
@@ -52,7 +52,7 @@ describe('components/NotificationRow.tsx', () => {
5252 . spyOn ( global . Date , 'now' )
5353 . mockImplementation ( ( ) => new Date ( '2024' ) . valueOf ( ) ) ;
5454
55- const mockNotification = mockedSingleNotification ;
55+ const mockNotification = mockSingleNotification ;
5656 mockNotification . subject . user = null ;
5757
5858 const props = {
@@ -70,7 +70,7 @@ describe('components/NotificationRow.tsx', () => {
7070 . spyOn ( global . Date , 'now' )
7171 . mockImplementation ( ( ) => new Date ( '2024' ) . valueOf ( ) ) ;
7272
73- const mockNotification = mockedSingleNotification ;
73+ const mockNotification = mockSingleNotification ;
7474 mockNotification . subject . comments = null ;
7575
7676 const props = {
@@ -87,7 +87,7 @@ describe('components/NotificationRow.tsx', () => {
8787 . spyOn ( global . Date , 'now' )
8888 . mockImplementation ( ( ) => new Date ( '2024' ) . valueOf ( ) ) ;
8989
90- const mockNotification = mockedSingleNotification ;
90+ const mockNotification = mockSingleNotification ;
9191 mockNotification . subject . comments = 1 ;
9292
9393 const props = {
@@ -104,7 +104,7 @@ describe('components/NotificationRow.tsx', () => {
104104 . spyOn ( global . Date , 'now' )
105105 . mockImplementation ( ( ) => new Date ( '2024' ) . valueOf ( ) ) ;
106106
107- const mockNotification = mockedSingleNotification ;
107+ const mockNotification = mockSingleNotification ;
108108 mockNotification . subject . comments = 2 ;
109109
110110 const props = {
@@ -122,7 +122,7 @@ describe('components/NotificationRow.tsx', () => {
122122 const removeNotificationFromState = jest . fn ( ) ;
123123
124124 const props = {
125- notification : mockedSingleNotification ,
125+ notification : mockSingleNotification ,
126126 hostname : 'github.com' ,
127127 } ;
128128
@@ -147,7 +147,7 @@ describe('components/NotificationRow.tsx', () => {
147147 const removeNotificationFromState = jest . fn ( ) ;
148148
149149 const props = {
150- notification : mockedSingleNotification ,
150+ notification : mockSingleNotification ,
151151 hostname : 'github.com' ,
152152 } ;
153153
@@ -172,7 +172,7 @@ describe('components/NotificationRow.tsx', () => {
172172 const markNotificationDone = jest . fn ( ) ;
173173
174174 const props = {
175- notification : mockedSingleNotification ,
175+ notification : mockSingleNotification ,
176176 hostname : 'github.com' ,
177177 } ;
178178
@@ -197,7 +197,7 @@ describe('components/NotificationRow.tsx', () => {
197197 const markNotificationRead = jest . fn ( ) ;
198198
199199 const props = {
200- notification : mockedSingleNotification ,
200+ notification : mockSingleNotification ,
201201 hostname : 'github.com' ,
202202 } ;
203203
@@ -222,7 +222,7 @@ describe('components/NotificationRow.tsx', () => {
222222 const markNotificationDone = jest . fn ( ) ;
223223
224224 const props = {
225- notification : mockedSingleNotification ,
225+ notification : mockSingleNotification ,
226226 hostname : 'github.com' ,
227227 } ;
228228
@@ -247,7 +247,7 @@ describe('components/NotificationRow.tsx', () => {
247247 const unsubscribeNotification = jest . fn ( ) ;
248248
249249 const props = {
250- notification : mockedSingleNotification ,
250+ notification : mockSingleNotification ,
251251 hostname : 'github.com' ,
252252 } ;
253253
@@ -265,9 +265,9 @@ describe('components/NotificationRow.tsx', () => {
265265 it ( 'should open notification user profile' , ( ) => {
266266 const props = {
267267 notification : {
268- ...mockedSingleNotification ,
268+ ...mockSingleNotification ,
269269 subject : {
270- ...mockedSingleNotification . subject ,
270+ ...mockSingleNotification . subject ,
271271 user : {
272272 login : 'some-user' ,
273273 html_url : 'https://github.com/some-user' ,
0 commit comments