diff --git a/public/index.html b/public/index.html index 1d1d9e7..1254e58 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - + { type: 'column', }, { - name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), - data: results.SKIPPED, + name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.fail' }), + data: results.FAIL, type: 'column', }, { @@ -101,8 +101,8 @@ const generateResultsData = (builds) => { type: 'column', }, { - name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.fail' }), - data: results.FAIL, + name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), + data: results.SKIPPED, type: 'column', }, // { diff --git a/src/components/pages/dashboard/charts/ExecutionPieChart.js b/src/components/pages/dashboard/charts/ExecutionPieChart.js index f758185..33aa051 100644 --- a/src/components/pages/dashboard/charts/ExecutionPieChart.js +++ b/src/components/pages/dashboard/charts/ExecutionPieChart.js @@ -18,8 +18,12 @@ const defaultOptions = { show: true, }, }, - colors: ['var(--pass-color)', 'var(--skipped-color)', 'var(--error-color)', 'var(--fail-color)'], - legend: { show: true }, + colors: ['var(--pass-color)', 'var(--fail-color)', 'var(--error-color)', 'var(--skipped-color)'], + legend: { + show: true, + fontSize: '15px', + formatter: (seriesName, opts) => `${seriesName}: ${opts.w.config.series[opts.seriesIndex]}`, + }, }; const generatePieChartData = (testRunMetrics) => { @@ -31,12 +35,12 @@ const generatePieChartData = (testRunMetrics) => { error, } = testRunMetrics; const graphData = { - data: [pass || 0, skipped || 0, error || 0, fail || 0], + data: [pass || 0, fail || 0, error || 0, skipped || 0], labels: [ intl.formatMessage({ id: 'page.dashboard.chart.barchart.pass' }), - intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), - intl.formatMessage({ id: 'page.dashboard.chart.barchart.error' }), intl.formatMessage({ id: 'page.dashboard.chart.barchart.fail' }), + intl.formatMessage({ id: 'page.dashboard.chart.barchart.error' }), + intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), ], }; return graphData; diff --git a/src/components/pages/metrics/charts/ExecutionMetricsResultsBarChart.js b/src/components/pages/metrics/charts/ExecutionMetricsResultsBarChart.js index 755442a..75c6759 100644 --- a/src/components/pages/metrics/charts/ExecutionMetricsResultsBarChart.js +++ b/src/components/pages/metrics/charts/ExecutionMetricsResultsBarChart.js @@ -35,7 +35,7 @@ const defaultOptions = { }, }, yaxis: [], - colors: ['var(--pass-color)', 'var(--skipped-color)', 'var(--error-color)', 'var(--fail-color)'], + colors: ['var(--pass-color)', 'var(--fail-color)', 'var(--error-color)', 'var(--skipped-color)'], legend: { show: true }, }; @@ -71,8 +71,8 @@ const generateMetricsResultsData = (metrics) => { type: 'column', }, { - name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), - data: results.SKIPPED, + name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.fail' }), + data: results.FAIL, type: 'column', }, { @@ -81,8 +81,8 @@ const generateMetricsResultsData = (metrics) => { type: 'column', }, { - name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.pass' }), - data: results.FAIL, + name: intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), + data: results.SKIPPED, type: 'column', }, ); diff --git a/src/components/pages/test-execution-history/charts/TestExecutionsResultPieChart.js b/src/components/pages/test-execution-history/charts/TestExecutionsResultPieChart.js index 1ca7e9c..05afccc 100644 --- a/src/components/pages/test-execution-history/charts/TestExecutionsResultPieChart.js +++ b/src/components/pages/test-execution-history/charts/TestExecutionsResultPieChart.js @@ -17,8 +17,13 @@ const defaultOptions = { show: true, }, }, - colors: ['var(--pass-color)', 'var(--skipped-color)', 'var(--error-color)', 'var(--fail-color)'], - legend: { show: false }, + colors: ['var(--pass-color)', 'var(--fail-color)', 'var(--error-color)', 'var(--skipped-color)'], + legend: { + show: true, + fontSize: '14px', + formatter: (seriesName, opts) => `${seriesName}: ${opts.w.config.series[opts.seriesIndex]}`, + + }, }; const generateExecutionMetricsPieChartData = (executions) => { @@ -37,11 +42,11 @@ const generateExecutionMetricsPieChartData = (executions) => { SKIPPED, ERROR, } = result; - const data = [PASS, SKIPPED, ERROR, FAIL]; + const data = [PASS, FAIL, ERROR, SKIPPED]; const graphData = { data, - labels: ['PASS', 'SKIPPED', 'ERROR', 'FAIL'], - colors: ['var(--pass-color)', 'var(--skipped-color)', 'var(--error-color)', 'var(--fail-color)'], + labels: ['PASS', 'FAIL', 'ERROR', 'SKIPPED'], + colors: ['var(--pass-color)', 'var(--fail-color)', 'var(--error-color)', 'var(--skipped-color)'], }; return graphData; }; diff --git a/src/components/pages/test-run/TestRunDetailsPage.js b/src/components/pages/test-run/TestRunDetailsPage.js index 2c2984d..ef95d8b 100644 --- a/src/components/pages/test-run/TestRunDetailsPage.js +++ b/src/components/pages/test-run/TestRunDetailsPage.js @@ -9,6 +9,8 @@ import { saveAs } from 'file-saver'; import { AiOutlineTeam, AiOutlinePartition } from 'react-icons/ai'; import { GiSandsOfTime, GiTrafficLightsGreen } from 'react-icons/gi'; import { BiSolidFlagCheckered } from 'react-icons/bi'; +import { PiMapPinDuotone } from 'react-icons/pi'; + import { BsJournalCheck, BsJournalX, @@ -291,62 +293,85 @@ const TestRunDetailsPage = function (props) { - - {intl.formatMessage({ id: 'page.test-run.icons.team.whisper' })} - - )} - > - - - {currentBuild.team.name} - - - - {intl.formatMessage({ id: 'page.test-run.icons.component.whisper' })} - - )} - > - - - {getComponentName(currentBuild).name} - - - - {intl.formatMessage({ id: 'page.test-run.icons.phase.whisper' })} - - )} - > - - { - (currentBuild.phase) ? ( - <> - - {currentBuild.phase.name} - - ) : ( - <> - - none - - ) - } - - + + + {intl.formatMessage({ id: 'page.test-run.icons.team.whisper' })} + + )} + > + + + {currentBuild.environment.name} + + + + + + {intl.formatMessage({ id: 'page.test-run.icons.component.whisper' })} + + )} + > + + + {getComponentName(currentBuild).name} + + + + + + {intl.formatMessage({ id: 'page.test-run.icons.team.whisper' })} + + )} + > + + + {currentBuild.team.name} + + + + + + {intl.formatMessage({ id: 'page.test-run.icons.phase.whisper' })} + + )} + > + + { + (currentBuild.phase) ? ( + <> + + {currentBuild.phase.name} + + ) : ( + <> + + none + + ) + } + + + diff --git a/src/components/pages/test-run/charts/ExecutionPieChart.js b/src/components/pages/test-run/charts/ExecutionPieChart.js index 4334f21..c4e6ed6 100644 --- a/src/components/pages/test-run/charts/ExecutionPieChart.js +++ b/src/components/pages/test-run/charts/ExecutionPieChart.js @@ -24,8 +24,12 @@ const defaultOptions = { show: true, }, }, - colors: ['var(--pass-color)', 'var(--skipped-color)', 'var(--error-color)', 'var(--fail-color)'], - legend: { show: true }, + colors: ['var(--pass-color)', 'var(--fail-color)', 'var(--error-color)', 'var(--skipped-color)'], + legend: { + show: true, + fontSize: '15px', + formatter: (seriesName, opts) => `${seriesName}: ${opts.w.config.series[opts.seriesIndex]}`, + }, }; const generateExecutionMetricsPieChartData = (currentBuild) => { @@ -37,14 +41,14 @@ const generateExecutionMetricsPieChartData = (currentBuild) => { SKIPPED, ERROR, } = currentBuild.result; - const data = [PASS, SKIPPED, ERROR, FAIL]; + const data = [PASS, FAIL, ERROR, SKIPPED]; const graphData = { data, labels: [ intl.formatMessage({ id: 'page.dashboard.chart.barchart.pass' }), - intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), - intl.formatMessage({ id: 'page.dashboard.chart.barchart.error' }), intl.formatMessage({ id: 'page.dashboard.chart.barchart.fail' }), + intl.formatMessage({ id: 'page.dashboard.chart.barchart.error' }), + intl.formatMessage({ id: 'page.dashboard.chart.barchart.skipped' }), ], colors: ['var(--pass-color)', 'var(--skipped-color)', 'var(--error-color)', 'var(--fail-color)'], }; diff --git a/src/components/pages/test-run/styles.less b/src/components/pages/test-run/styles.less index f30bb35..c0d8e2b 100644 --- a/src/components/pages/test-run/styles.less +++ b/src/components/pages/test-run/styles.less @@ -100,6 +100,9 @@ :nth-child(2) { text-align: center; } + :nth-child(3) { + text-align: center; + } :last-child { text-align: right; }