Skip to content

Commit a373f86

Browse files
authored
show counter in test run details (#301)
1 parent 1a63877 commit a373f86

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/components/TestDetailsDialog/TestDetailsModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ const useStyles = makeStyles((theme) => ({
6262

6363
const TestDetailsModal: React.FunctionComponent<{
6464
testRun: TestRun;
65+
currentRunIndex: number;
66+
totalTestRunCount: number;
6567
touched: boolean;
6668
handleClose: () => void;
67-
}> = ({ testRun, touched, handleClose }) => {
69+
}> = ({ testRun, currentRunIndex, totalTestRunCount, touched, handleClose }) => {
6870
const classes = useStyles();
6971
const navigate = useNavigate();
7072
const { enqueueSnackbar } = useSnackbar();
@@ -278,6 +280,9 @@ const TestDetailsModal: React.FunctionComponent<{
278280
</Tooltip>
279281
</Grid>
280282
)}
283+
<Grid item>
284+
<Typography variant="h6">{currentRunIndex+1} of {totalTestRunCount}</Typography>
285+
</Grid>
281286
{(testRun.status === TestStatus.unresolved ||
282287
testRun.status === TestStatus.new) && (
283288
<Grid item>

src/components/TestDetailsDialog/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ export const TestDetailsDialog: React.FunctionComponent = () => {
6868
<Dialog open={true} fullScreen className={classes.modal}>
6969
<TestDetailsModal
7070
testRun={selectedTestRun}
71+
currentRunIndex={testRuns.findIndex((e) => e.id === selectedTestRun.id)}
72+
totalTestRunCount={testRuns.length}
7173
touched={touched}
7274
handleClose={() => handleNavigation()}
7375
/>

0 commit comments

Comments
 (0)