|
1 | 1 | <template> |
2 | 2 | <!-- Index --> |
3 | 3 | <div class="index" data-title="Welcome!" data-intro="Welcome to use api-testing! 👋"> |
4 | | - <el-card class="card" shawon="hover"> |
5 | | - <el-button |
6 | | - type="primary" |
7 | | - @click="openTestSuiteCreateDialog" |
8 | | - data-intro="Click here to create a new test suite" |
9 | | - test-id="open-new-suite-dialog" |
10 | | - :icon="Edit" |
11 | | - >{{ t('button.new') }}</el-button |
12 | | - > |
13 | | - <el-button |
14 | | - type="primary" |
15 | | - @click="openTestSuiteImportDialog" |
16 | | - data-intro="Click here to import from Postman" |
17 | | - test-id="open-import-suite-dialog" |
18 | | - >{{ t('button.import') }}</el-button |
19 | | - > |
20 | | - <el-button type="primary" @click="loadStores" :icon="Refresh">{{ |
21 | | - t('button.refresh') |
22 | | - }}</el-button> |
23 | | - <TemplateFunctions /> |
24 | | - <div class="filter-input"> |
25 | | - <el-input v-model="filterText" :placeholder="t('tip.filter')" test-id="search" /> |
26 | | - </div> |
27 | | - |
28 | | - <div class="test-container"> |
29 | | - <!-- Test suite tree containers --> |
30 | | - <el-tree |
31 | | - v-loading="storesLoading" |
32 | | - :data="data" |
33 | | - highlight-current |
34 | | - :check-on-click-node="true" |
35 | | - :expand-on-click-node="false" |
36 | | - :current-node-key="currentNodekey" |
37 | | - ref="treeRef" |
38 | | - node-key="id" |
39 | | - :filter-node-method="filterTestCases" |
40 | | - @node-click="handleNodeClick" |
41 | | - data-intro="This is the test suite tree. You can click the test suite to edit it." |
42 | | - > |
43 | | - <template #default="{ node, data }"> |
44 | | - <span> |
45 | | - <i :class="getColorClass(data.kind)">{{ data.kind }}</i> |
46 | | - <i class="test-suite">{{ node.label }}</i> |
47 | | - </span> |
48 | | - </template> |
49 | | - </el-tree> |
50 | | - <!-- Test suite and case containers. --> |
51 | | - <el-card shadow="hover"> |
52 | | - <TestCase |
53 | | - v-if="viewName === 'testcase'" |
54 | | - :suite="testSuite" |
55 | | - :kindName="testSuiteKind" |
56 | | - :name="testCaseName" |
57 | | - @updated="loadStores" |
58 | | - style="height: 100%" |
59 | | - data-intro="This is the test case editor. You can edit the test case here." |
60 | | - /> |
61 | | - <TestSuite |
62 | | - v-else-if="viewName === 'testsuite'" |
63 | | - :name="testSuite" |
64 | | - @updated="loadStores" |
65 | | - data-intro="This is the test suite editor. You can edit the test suite here." |
66 | | - /> |
67 | | - </el-card> |
68 | | - </div> |
| 4 | + <el-card class="card" shawon="hover" :body-style="{ width: '100%' }"> |
| 5 | + <el-container style="height: 100%"> |
| 6 | + <el-main style="padding-top: 5px; padding-bottom: 5px;"> |
| 7 | + <el-container style="height: 100%;"> |
| 8 | + <el-aside> |
| 9 | + <el-button |
| 10 | + type="primary" |
| 11 | + @click="openTestSuiteCreateDialog" |
| 12 | + data-intro="Click here to create a new test suite" |
| 13 | + test-id="open-new-suite-dialog" |
| 14 | + :icon="Edit" |
| 15 | + >{{ t('button.new') }}</el-button |
| 16 | + > |
| 17 | + <el-button |
| 18 | + type="primary" |
| 19 | + @click="openTestSuiteImportDialog" |
| 20 | + data-intro="Click here to import from Postman" |
| 21 | + test-id="open-import-suite-dialog" |
| 22 | + >{{ t('button.import') }}</el-button |
| 23 | + > |
| 24 | + <el-button type="primary" @click="loadStores" :icon="Refresh">{{ |
| 25 | + t('button.refresh') |
| 26 | + }}</el-button> |
| 27 | + <div class="filter-input"> |
| 28 | + <el-input v-model="filterText" :placeholder="t('tip.filter')" test-id="search" /> |
| 29 | + </div> |
| 30 | + <!-- Test suite tree containers --> |
| 31 | + <el-tree |
| 32 | + v-loading="storesLoading" |
| 33 | + :data="data" |
| 34 | + highlight-current |
| 35 | + :check-on-click-node="true" |
| 36 | + :expand-on-click-node="false" |
| 37 | + :current-node-key="currentNodekey" |
| 38 | + ref="treeRef" |
| 39 | + node-key="id" |
| 40 | + :filter-node-method="filterTestCases" |
| 41 | + @node-click="handleNodeClick" |
| 42 | + data-intro="This is the test suite tree. You can click the test suite to edit it." |
| 43 | + > |
| 44 | + <template #default="{ node, data }"> |
| 45 | + <span> |
| 46 | + <i :class="getColorClass(data.kind)">{{ data.kind }}</i> |
| 47 | + <i class="test-suite">{{ node.label }}</i> |
| 48 | + </span> |
| 49 | + </template> |
| 50 | + </el-tree> |
| 51 | + <TemplateFunctions /> |
| 52 | + </el-aside> |
| 53 | + <!-- Test suite and case containers. --> |
| 54 | + <el-main style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"> |
| 55 | + <el-card shadow="hover"> |
| 56 | + <TestCase |
| 57 | + v-if="viewName === 'testcase'" |
| 58 | + :suite="testSuite" |
| 59 | + :kindName="testSuiteKind" |
| 60 | + :name="testCaseName" |
| 61 | + @updated="loadStores" |
| 62 | + style="height: 100%" |
| 63 | + data-intro="This is the test case editor. You can edit the test case here." |
| 64 | + /> |
| 65 | + <TestSuite |
| 66 | + v-else-if="viewName === 'testsuite'" |
| 67 | + :name="testSuite" |
| 68 | + @updated="loadStores" |
| 69 | + data-intro="This is the test suite editor. You can edit the test suite here." |
| 70 | + /> |
| 71 | + </el-card> |
| 72 | + </el-main> |
| 73 | + </el-container> |
| 74 | + </el-main> |
| 75 | + </el-container> |
69 | 76 | </el-card> |
70 | 77 | </div> |
71 | 78 |
|
@@ -593,9 +600,8 @@ const getColorClass = (kind: string) => { |
593 | 600 |
|
594 | 601 | .filter-input { |
595 | 602 | vertical-align: middle; |
596 | | - float: right; |
597 | | - padding-left: 1vh; |
598 | | - width: 50vh; |
| 603 | + padding-top: 1vh; |
| 604 | + padding-bottom: 1vh; |
599 | 605 | } |
600 | 606 | } |
601 | 607 |
|
@@ -672,28 +678,6 @@ nav a:first-of-type { |
672 | 678 | font-weight: 600; |
673 | 679 | } |
674 | 680 |
|
675 | | -.test-container { |
676 | | - display: flex; |
677 | | - flex-direction: row; |
678 | | - margin-top: 2%; |
679 | | - justify-content: space-around; |
680 | | - width: 100%; |
681 | | -
|
682 | | - .el-tree { |
683 | | - width: 30vh; |
684 | | - } |
685 | | -
|
686 | | - span { |
687 | | - display: flex; |
688 | | - flex-direction: row-reverse; |
689 | | - align-items: center; |
690 | | -
|
691 | | - i { |
692 | | - padding-left: 10%; |
693 | | - } |
694 | | - } |
695 | | -} |
696 | | -
|
697 | 681 | .test-suite { |
698 | 682 | padding-left: 10%; |
699 | 683 | font-style: normal; |
|
0 commit comments