@@ -98,9 +98,6 @@ const TestDetailsModal: React.FunctionComponent<{
9898 } ;
9999
100100 const handleClose = ( ) => {
101- history . push ( {
102- search : `buildId=${ testRun . buildId } ` ,
103- } ) ;
104101 selectTestRun ( testRunDispatch , undefined ) ;
105102 } ;
106103
@@ -116,9 +113,9 @@ const TestDetailsModal: React.FunctionComponent<{
116113 const fitStageToScreen = ( ) => {
117114 const scale = image
118115 ? Math . min (
119- stageWidth < image . width ? stageWidth / image . width : 1 ,
120- stageHeigth < image . height ? stageHeigth / image . height : 1
121- )
116+ stageWidth < image . width ? stageWidth / image . width : 1 ,
117+ stageHeigth < image . height ? stageHeigth / image . height : 1
118+ )
122119 : 1 ;
123120 setStageScale ( scale ) ;
124121 resetPositioin ( ) ;
@@ -151,7 +148,11 @@ const TestDetailsModal: React.FunctionComponent<{
151148 [ image , baselineImage , testRun . baselineName , testRun . imageName ]
152149 ) ;
153150
154- useHotkeys ( "d" , ( ) => shouldDiffHotKeyBeActive && setIsDiffShown ( ( isDiffShown ) => ! isDiffShown ) ) ;
151+ useHotkeys (
152+ "d" ,
153+ ( ) =>
154+ shouldDiffHotKeyBeActive && setIsDiffShown ( ( isDiffShown ) => ! isDiffShown )
155+ ) ;
155156 useHotkeys ( "ESC" , ( ) => handleClose ( ) ) ;
156157 const shouldDiffHotKeyBeActive = ! ! testRun . diffName ;
157158
@@ -167,7 +168,7 @@ const TestDetailsModal: React.FunctionComponent<{
167168 < Grid item >
168169 < Typography variant = "h6" > { testRun . name } </ Typography >
169170 </ Grid >
170- { ( shouldDiffHotKeyBeActive ) && (
171+ { shouldDiffHotKeyBeActive && (
171172 < Grid item >
172173 < Tooltip title = { "Hotkey: D" } >
173174 < Switch
@@ -180,10 +181,10 @@ const TestDetailsModal: React.FunctionComponent<{
180181 ) }
181182 { ( testRun . status === TestStatus . unresolved ||
182183 testRun . status === TestStatus . new ) && (
183- < Grid item >
184- < ApproveRejectButtons testRun = { testRun } />
185- </ Grid >
186- ) }
184+ < Grid item >
185+ < ApproveRejectButtons testRun = { testRun } />
186+ </ Grid >
187+ ) }
187188 < Grid item >
188189 < IconButton color = "inherit" onClick = { handleClose } >
189190 < Close />
@@ -338,7 +339,7 @@ const TestDetailsModal: React.FunctionComponent<{
338339 />
339340 </ Grid >
340341 < Grid item xs = { 6 } className = { classes . drawAreaItem } >
341- { ( isDiffShown ) ? (
342+ { isDiffShown ? (
342343 < DrawArea
343344 type = "Diff"
344345 imageName = { testRun . diffName }
@@ -357,24 +358,24 @@ const TestDetailsModal: React.FunctionComponent<{
357358 drawModeState = { [ isDrawMode , setIsDrawMode ] }
358359 />
359360 ) : (
360- < DrawArea
361- type = "Image"
362- imageName = { testRun . imageName }
363- branchName = { testRun . branchName }
364- imageState = { [ image , imageStatus ] }
365- ignoreAreas = { ignoreAreas }
366- tempIgnoreAreas = { JSON . parse ( testRun . tempIgnoreAreas ) }
367- setIgnoreAreas = { setIgnoreAreas }
368- selectedRectId = { selectedRectId }
369- setSelectedRectId = { setSelectedRectId }
370- onStageClick = { removeSelection }
371- stageScaleState = { [ stageScale , setStageScale ] }
372- stagePosState = { [ stagePos , setStagePos ] }
373- stageInitPosState = { [ stageInitPos , setStageInitPos ] }
374- stageOffsetState = { [ stageOffset , setStageOffset ] }
375- drawModeState = { [ isDrawMode , setIsDrawMode ] }
376- />
377- ) }
361+ < DrawArea
362+ type = "Image"
363+ imageName = { testRun . imageName }
364+ branchName = { testRun . branchName }
365+ imageState = { [ image , imageStatus ] }
366+ ignoreAreas = { ignoreAreas }
367+ tempIgnoreAreas = { JSON . parse ( testRun . tempIgnoreAreas ) }
368+ setIgnoreAreas = { setIgnoreAreas }
369+ selectedRectId = { selectedRectId }
370+ setSelectedRectId = { setSelectedRectId }
371+ onStageClick = { removeSelection }
372+ stageScaleState = { [ stageScale , setStageScale ] }
373+ stagePosState = { [ stagePos , setStagePos ] }
374+ stageInitPosState = { [ stageInitPos , setStageInitPos ] }
375+ stageOffsetState = { [ stageOffset , setStageOffset ] }
376+ drawModeState = { [ isDrawMode , setIsDrawMode ] }
377+ />
378+ ) }
378379 </ Grid >
379380 </ Grid >
380381 </ Box >
0 commit comments