diff --git a/src/components/common/execution-timeline/StepsTimeline.js b/src/components/common/execution-timeline/StepsTimeline.js index ad3d920..f0204a2 100644 --- a/src/components/common/execution-timeline/StepsTimeline.js +++ b/src/components/common/execution-timeline/StepsTimeline.js @@ -82,7 +82,7 @@ const StepsTimeline = function (props) { return ( -

{step.timestamp}

+

{step.timestamp}

{step.name}

{`Expected: ${step.expected}, Actual: ${step.actual}`}

{screenshotImage}

@@ -93,7 +93,7 @@ const StepsTimeline = function (props) { return ( -

{step.timestamp}

+

{step.timestamp}

{convertTextToLinks(step.info)}

{screenshotImage}

diff --git a/src/components/common/screenshot-view/ScreenshotDetailsTable.js b/src/components/common/screenshot-view/ScreenshotDetailsTable.js index 6065bc9..3d50562 100644 --- a/src/components/common/screenshot-view/ScreenshotDetailsTable.js +++ b/src/components/common/screenshot-view/ScreenshotDetailsTable.js @@ -37,7 +37,7 @@ const ScreenshotDetailsTable = function (props) { : - + {currentScreenshotDetails.timestamp} @@ -50,7 +50,7 @@ const ScreenshotDetailsTable = function (props) { : - + {currentBaseLineDetails.screenshot.timestamp} diff --git a/src/components/common/screenshot-view/history/ScreenshotHistoryView.js b/src/components/common/screenshot-view/history/ScreenshotHistoryView.js index 681227a..eb9ccaf 100644 --- a/src/components/common/screenshot-view/history/ScreenshotHistoryView.js +++ b/src/components/common/screenshot-view/history/ScreenshotHistoryView.js @@ -101,7 +101,7 @@ const ScreenshotHistoryView = function (props) { : - + {screenshot.timestamp} diff --git a/src/components/common/test-suite/ExecutionTable.js b/src/components/common/test-suite/ExecutionTable.js index a3c961c..1863786 100644 --- a/src/components/common/test-suite/ExecutionTable.js +++ b/src/components/common/test-suite/ExecutionTable.js @@ -62,7 +62,7 @@ const ExecutionTable = function (props) {
- + {execution.start} diff --git a/src/components/pages/dashboard/BuildsTable.js b/src/components/pages/dashboard/BuildsTable.js index 2a95f57..59b6920 100644 --- a/src/components/pages/dashboard/BuildsTable.js +++ b/src/components/pages/dashboard/BuildsTable.js @@ -11,7 +11,6 @@ import { Table, Popover, Whisper, - CheckboxGroup, } from 'rsuite'; import { getDuration } from '../../../utility/TimeUtilities'; import ExecutionsResultsBar from '../../common/results-bar'; @@ -72,15 +71,13 @@ const CheckCell = function (props) { return ( // eslint-disable-next-line react/jsx-props-no-spreading - - toggleSelectedBuild(build)} - checked={isRowSelected(build)} - inline={false} - /> - + toggleSelectedBuild(build)} + checked={isRowSelected(build)} + inline={false} + /> ); }; @@ -94,12 +91,12 @@ const DateCell = function (props) {
- + {build.start} - + {build.start}
@@ -123,7 +120,7 @@ const ResultCell = function (props) { const { rowData: build } = props; return ( // eslint-disable-next-line react/jsx-props-no-spreading - + ); diff --git a/src/components/pages/dashboard/charts/ExecutionBarChart.js b/src/components/pages/dashboard/charts/ExecutionBarChart.js index 2bd1bf0..cabd68e 100644 --- a/src/components/pages/dashboard/charts/ExecutionBarChart.js +++ b/src/components/pages/dashboard/charts/ExecutionBarChart.js @@ -4,6 +4,7 @@ import { Panel, Stack } from 'rsuite'; import { useIntl } from 'react-intl'; import moment from 'moment'; // import { getBuildDurationInSeconds } from '../../../../utility/TimeUtilities'; +import { useNavigate } from 'react-router-dom'; const defaultOptions = { chart: { @@ -16,12 +17,7 @@ const defaultOptions = { background: 'var(--main-panel-background)', foreColor: 'var(--main-panel-font-color)', // TODO: could look at adding some click events for filtering etc - // events: - // { - // click: (event, chartContext, config) => { - // console.log(event, chartContext, config); - // }, - // }, + events: {}, }, plotOptions: { bar: { @@ -86,7 +82,7 @@ const generateResultsData = (builds) => { results.ERROR.push(ERROR || 0); results.FAIL.push(FAIL || 0); // results.executionTimes.push(getBuildDurationInSeconds(build)); - graphData.labels.push(moment(build.start).format('YYYY-MM-DD hh:mm:ss')); + graphData.labels.push(moment.utc(moment(build.start)).format('YYYY-MM-DD HH:mm:ss')); }); graphData.data.push( { @@ -120,7 +116,12 @@ const generateResultsData = (builds) => { const ExecutionBarChart = function (props) { const { builds, title } = props; + const reversedBuilds = [...builds].reverse(); + const navigate = useNavigate(); const graphData = generateResultsData(builds); + defaultOptions.chart.events.click = function (event, chartContext, config) { + navigate(`/test-run/?buildId=${reversedBuilds[config.dataPointIndex]._id}`); + }; const { data, labels } = graphData; return ( { const executionsToReverse = [...executions]; executionsToReverse.reverse().forEach((execution) => { executionTimes.push(getBuildDurationInSeconds(execution)); - graphData.labels.push(moment(execution.start).format('YYYY-MM-DD hh:mm:ss')); + graphData.labels.push(moment.utc(moment(execution.start)).format('YYYY-MM-DD hh:mm:ss')); }); graphData.data.push( { name: 'ExecutionTime', data: executionTimes, type: 'line' }, diff --git a/src/components/pages/test-run-compare/TestRunCompareTable.js b/src/components/pages/test-run-compare/TestRunCompareTable.js index 8983b91..4d17bef 100644 --- a/src/components/pages/test-run-compare/TestRunCompareTable.js +++ b/src/components/pages/test-run-compare/TestRunCompareTable.js @@ -183,7 +183,7 @@ const TestRunCompareTable = function (props) { }; testRunCompareBuilds.forEach((build) => { names[build._id] = build.name; - startDates[build._id] = {build.start}; + startDates[build._id] = {build.start}; environments[build._id] = build.environment.name; }); buildDetailsRows.push(names); diff --git a/src/containers/App.js b/src/containers/App.js index 1f3684f..8e1a1d7 100644 --- a/src/containers/App.js +++ b/src/containers/App.js @@ -168,10 +168,12 @@ const App = function (props) { > -
- Angles - Angles -
+ +
+ Angles + Angles +
+