@@ -10,6 +10,8 @@ import {
1010 Paper ,
1111 Box ,
1212 makeStyles ,
13+ Chip ,
14+ Tooltip ,
1315} from "@material-ui/core" ;
1416import { ToggleButton } from "@material-ui/lab" ;
1517import { TestRun } from "../types" ;
@@ -154,26 +156,41 @@ const TestDetailsModal: React.FunctionComponent<{
154156 { ( testRun . status === TestStatus . unresolved ||
155157 testRun . status === TestStatus . new ) && (
156158 < Grid item >
157- < Button
158- color = "inherit"
159- onClick = { ( ) =>
160- testRunService . approve ( testRun . id , testRun . merge ) . then ( ( testRun ) => {
161- updateTestRun ( testRunDispatch , testRun ) ;
162- } )
163- }
164- >
165- Approve
166- </ Button >
167- < Button
168- color = "secondary"
169- onClick = { ( ) =>
170- testRunService . reject ( testRun . id ) . then ( ( testRun ) => {
171- updateTestRun ( testRunDispatch , testRun ) ;
172- } )
173- }
174- >
175- Reject
176- </ Button >
159+ < Grid container spacing = { 2 } alignItems = "center" >
160+ { testRun . merge && (
161+ < Grid item >
162+ < Tooltip title = "Will replace target branch baseline if accepted" >
163+ < Chip label = "merge" color = "secondary" size = "small" />
164+ </ Tooltip >
165+ </ Grid >
166+ ) }
167+ < Grid item >
168+ < Button
169+ color = "inherit"
170+ onClick = { ( ) =>
171+ testRunService
172+ . approve ( testRun . id , testRun . merge )
173+ . then ( ( testRun ) => {
174+ updateTestRun ( testRunDispatch , testRun ) ;
175+ } )
176+ }
177+ >
178+ Approve
179+ </ Button >
180+ </ Grid >
181+ < Grid item >
182+ < Button
183+ color = "secondary"
184+ onClick = { ( ) =>
185+ testRunService . reject ( testRun . id ) . then ( ( testRun ) => {
186+ updateTestRun ( testRunDispatch , testRun ) ;
187+ } )
188+ }
189+ >
190+ Reject
191+ </ Button >
192+ </ Grid >
193+ </ Grid >
177194 </ Grid >
178195 ) }
179196 < Grid item >
@@ -213,8 +230,10 @@ const TestDetailsModal: React.FunctionComponent<{
213230 . setComment ( testRun . id , comment )
214231 . then ( ( testRun ) => updateTestRun ( testRunDispatch , testRun ) ) ,
215232 // update in variation
216- testVariationService
217- . setComment ( testRun . testVariationId , comment ) ,
233+ testVariationService . setComment (
234+ testRun . testVariationId ,
235+ comment
236+ ) ,
218237 ] )
219238 }
220239 />
0 commit comments