-
Notifications
You must be signed in to change notification settings - Fork 67
/
Router.tsx
40 lines (34 loc) 路 1.62 KB
/
Router.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {Navigate, Route, Routes} from 'react-router-dom';
import VariableSet from 'pages/VariableSet';
import Home from 'pages/Home';
import TestSuites from 'pages/TestSuites';
import RunDetail from 'pages/RunDetail';
import Settings from 'pages/Settings';
import Test from 'pages/Test';
import TestSuite from 'pages/TestSuite';
import TestSuiteRunOverview from 'pages/TestSuiteRunOverview';
import TestSuiteRunAutomate from 'pages/TestSuiteRunAutomate';
import AutomatedTestRun from 'pages/AutomatedTestRun';
import Layout from 'components/Layout/Layout';
const Router = () => (
<Routes>
<Route element={<Layout hasMenu />}>
<Route path="/" element={<Home />} />
<Route path="/testsuites" element={<TestSuites />} />
<Route path="/variablesets" element={<VariableSet />} />
<Route path="/settings" element={<Settings />} />
</Route>
<Route element={<Layout />}>
<Route path="/test/:testId" element={<Test />} />
<Route path="/test/:testId/run/:runId" element={<RunDetail />} />
<Route path="/test/:testId/run/:runId/:mode" element={<RunDetail />} />
<Route path="/test/:testId/run" element={<AutomatedTestRun />} />
<Route path="/testsuite/:testSuiteId" element={<TestSuite />} />
<Route path="/testsuite/:testSuiteId/run/:runId" element={<TestSuiteRunOverview />} />
<Route path="/testsuite/:testSuiteId/run/:runId/overview" element={<TestSuiteRunOverview />} />
<Route path="/testsuite/:testSuiteId/run/:runId/automate" element={<TestSuiteRunAutomate />} />
</Route>
<Route path="*" element={<Navigate to="/" />} />
</Routes>
);
export default Router;