diff --git a/src/Router.jsx b/src/Router.jsx
index 0475d489..06f9081f 100644
--- a/src/Router.jsx
+++ b/src/Router.jsx
@@ -7,6 +7,8 @@ import PrivateRoute from "./components/PrivateRoute";
import { routes } from "./constants";
import RegisterPage from "./pages/RegisterPage";
import ProfilePage from "./pages/ProfilePage";
+import TestVariationListPage from "./pages/TestVariationListPage";
+import TestVariationDetailsPage from "./pages/TestVariationDetailsPage";
function Router() {
return (
@@ -28,6 +30,16 @@ function Router() {
path={`${routes.HOME}:projectId`}
component={() => }
/>
+ }
+ />
+ }
+ />
+ `${routes.HOME}${testVariation.projectId}?buildId=${testRun.buildId}&testId=${testRun.id}`
export const buildTestRunLocation = (testRun: TestRun) => ({
search: `buildId=${testRun.buildId}&testId=${testRun.id}`,
diff --git a/src/components/Filters.tsx b/src/components/Filters.tsx
index 8bfca33d..f47d001a 100644
--- a/src/components/Filters.tsx
+++ b/src/components/Filters.tsx
@@ -35,15 +35,15 @@ const Filters: React.FunctionComponent = ({
const [testStatus, setTestStatus] = testStatusState;
const osList = testRuns
- .map((t) => t.testVariation.os)
+ .map((t) => t.os)
.filter((v, i, array) => v && array.indexOf(v) === i);
const browserList = testRuns
- .map((t) => t.testVariation.browser)
+ .map((t) => t.browser)
.filter((v, i, array) => v && array.indexOf(v) === i);
const viewportList = testRuns
- .map((t) => t.testVariation.viewport)
+ .map((t) => t.viewport)
.filter((v, i, array) => v && array.indexOf(v) === i);
const testStatusList = testRuns
diff --git a/src/components/TestDetailsModal.tsx b/src/components/TestDetailsModal.tsx
index 79eed11c..9ced1df1 100644
--- a/src/components/TestDetailsModal.tsx
+++ b/src/components/TestDetailsModal.tsx
@@ -12,7 +12,7 @@ import {
} from "@material-ui/core";
import { TestRun } from "../types";
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
-import { testsService } from "../services";
+import { testRunService, testVariationService } from "../services";
import DrawArea from "./DrawArea";
import { TestStatus } from "../types/testStatus";
import { useHistory, Prompt } from "react-router-dom";
@@ -36,17 +36,15 @@ const TestDetailsModal: React.FunctionComponent<{
const history = useHistory();
const classes = useStyles();
- const [isDiffShown, setIsDiffShown] = useState(
- testRun.status === TestStatus.unresolved
- );
+ const [isDiffShown, setIsDiffShown] = useState(!!testRun.diffName);
const [selectedRectId, setSelectedRectId] = React.useState();
const [ignoreAreas, setIgnoreAreas] = React.useState(
- JSON.parse(testRun.testVariation.ignoreAreas)
+ JSON.parse(testRun.ignoreAreas)
);
React.useEffect(() => {
- setIgnoreAreas(JSON.parse(testRun.testVariation.ignoreAreas));
+ setIgnoreAreas(JSON.parse(testRun.ignoreAreas));
}, [testRun]);
const removeSelection = (event: KonvaEventObject) => {
@@ -72,7 +70,7 @@ const TestDetailsModal: React.FunctionComponent<{
};
const isIgnoreAreasSaved = () => {
- return testRun.testVariation.ignoreAreas === JSON.stringify(ignoreAreas);
+ return testRun.ignoreAreas === JSON.stringify(ignoreAreas);
};
return (
@@ -85,24 +83,22 @@ const TestDetailsModal: React.FunctionComponent<{
- {testRun.testVariation.name}
+ {testRun.name}
+
+
+ setIsDiffShown(!isDiffShown)}
+ name="Show diff"
+ />
- {testRun.status === TestStatus.unresolved && (
-
- setIsDiffShown(!isDiffShown)}
- name="Show diff"
- />
-
- )}
{(testRun.status === TestStatus.unresolved ||
testRun.status === TestStatus.new) && (