Select test cases
diff --git a/frontend/app/projects/[projectId]/runs/[runId]/RunPregressDonutChart.tsx b/frontend/app/projects/[projectId]/runs/[runId]/RunPregressDonutChart.tsx
new file mode 100644
index 0000000..1fb35d4
--- /dev/null
+++ b/frontend/app/projects/[projectId]/runs/[runId]/RunPregressDonutChart.tsx
@@ -0,0 +1,39 @@
+import React from "react";
+import { useState } from "react";
+import dynamic from "next/dynamic";
+const Chart = dynamic(() => import("react-apexcharts"), { ssr: false });
+
+const testCases = [
+ { name: "Passed", value: 12, color: "#17c964" },
+ { name: "Failed", value: 3, color: "#f31260" },
+ { name: "Skipped", value: 14, color: "#71717a" },
+ { name: "Untested", value: 32, color: "#d4d4d8" },
+];
+
+export default function RunProgressDounut() {
+ const [chartData, setChartData] = useState({
+ series: testCases.map((entry) => {
+ return entry.value;
+ }),
+ options: {
+ labels: testCases.map((entry) => {
+ return entry.name;
+ }),
+ colors: testCases.map((entry) => {
+ return entry.color;
+ }),
+ },
+ });
+ return (
+
+
Progress
+
+
+ );
+}
diff --git a/frontend/app/projects/[projectId]/runs/[runId]/RunProgressChart.tsx b/frontend/app/projects/[projectId]/runs/[runId]/RunProgressChart.tsx
deleted file mode 100644
index 0d72b09..0000000
--- a/frontend/app/projects/[projectId]/runs/[runId]/RunProgressChart.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import React from "react";
-import { useState } from "react";
-import Chart from "react-apexcharts";
-
-// type Props = {
-// projectId: string;
-// };
-
-const testCases = [
- { name: "Passed", value: 12, color: "#17c964" },
- { name: "Failed", value: 3, color: "#f31260" },
- { name: "Skipped", value: 14, color: "#71717a" },
- { name: "Untested", value: 32, color: "#d4d4d8" },
-];
-
-// export default function RunProgressChart({ projectId }: Props) {
-export default function RunProgressChart() {
- const [chartData, setChartData] = useState({
- series: testCases.map((entry) => {
- return {
- name: entry.name,
- data: [entry.value],
- };
- }),
- options: {
- chart: {
- type: "bar",
- height: 100,
- stacked: true,
- stackType: "100%",
- toolbar: {
- show: false,
- },
- },
- plotOptions: {
- bar: {
- horizontal: true,
- },
- },
- colors: testCases.map((entry) => {
- return entry.color;
- }),
- legend: {
- show: false,
- },
- yaxis: {
- show: false,
- },
- xaxis: {
- labels: {
- show: false,
- },
- axisTicks: {
- show: false,
- },
- },
- grid: {
- show: false,
- padding: {
- top: -20,
- bottom: -20,
- left: -20,
- },
- },
- tooltip: {
- x: {
- show: false,
- },
- },
- },
- });
- return (
-
-
Progress
-
-
- );
-}