feat: ui
This commit is contained in:
+36
-24
@@ -616,7 +616,7 @@
|
|||||||
.test-mock-item-top-row {
|
.test-mock-item-top-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
grid-template-columns: minmax(0, 1fr) auto;
|
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,6 +639,17 @@
|
|||||||
align-content: start;
|
align-content: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.test-mock-item-column + .test-mock-item-column {
|
||||||
|
padding-left: 16px;
|
||||||
|
border-left: 1px solid rgba(25, 54, 61, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.test-mock-item-toolbar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.test-mock-item-json {
|
.test-mock-item-json {
|
||||||
min-height: 160px;
|
min-height: 160px;
|
||||||
}
|
}
|
||||||
@@ -1215,13 +1226,19 @@
|
|||||||
.mock-source-grid,
|
.mock-source-grid,
|
||||||
.test-detail-grid,
|
.test-detail-grid,
|
||||||
.test-mock-item-grid,
|
.test-mock-item-grid,
|
||||||
.test-mock-item-top-row,
|
|
||||||
.test-mock-item-columns,
|
.test-mock-item-columns,
|
||||||
.settings-row-grid,
|
.settings-row-grid,
|
||||||
.settings-table-grid {
|
.settings-table-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.test-mock-item-column + .test-mock-item-column {
|
||||||
|
padding-left: 0;
|
||||||
|
border-left: 0;
|
||||||
|
padding-top: 12px;
|
||||||
|
border-top: 1px solid rgba(25, 54, 61, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
.picker-action-row,
|
.picker-action-row,
|
||||||
.test-mock-binding-header {
|
.test-mock-binding-header {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -1562,18 +1579,6 @@
|
|||||||
:key="`${mockSet.path}-binding-${activeTestMockBindingName(mockSet)}-item-${itemIndex}`"
|
:key="`${mockSet.path}-binding-${activeTestMockBindingName(mockSet)}-item-${itemIndex}`"
|
||||||
class="test-mock-item-card"
|
class="test-mock-item-card"
|
||||||
>
|
>
|
||||||
<div class="section-title">
|
|
||||||
<div>
|
|
||||||
<h3>{{ testMockItemTitle(item, itemIndex) }}</h3>
|
|
||||||
</div>
|
|
||||||
<q-btn
|
|
||||||
color="negative"
|
|
||||||
outline
|
|
||||||
label="Remove"
|
|
||||||
@click="removeTestMockBindingItem(testEntry, mockSet, activeTestMockBinding(mockSet), itemIndex)"
|
|
||||||
></q-btn>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-if="activeTestMockBindingMode(mockSet) === 'rest'">
|
<template v-if="activeTestMockBindingMode(mockSet) === 'rest'">
|
||||||
<div class="test-mock-item-top-row">
|
<div class="test-mock-item-top-row">
|
||||||
<div>
|
<div>
|
||||||
@@ -1604,6 +1609,13 @@
|
|||||||
@update:model-value="setTestMockItemSkip(testEntry, mockSet, item, $event)"
|
@update:model-value="setTestMockItemSkip(testEntry, mockSet, item, $event)"
|
||||||
></q-checkbox>
|
></q-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-btn
|
||||||
|
color="negative"
|
||||||
|
outline
|
||||||
|
label="Remove"
|
||||||
|
@click="removeTestMockBindingItem(testEntry, mockSet, activeTestMockBinding(mockSet), itemIndex)"
|
||||||
|
></q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="test-mock-item-columns q-mt-md">
|
<div class="test-mock-item-columns q-mt-md">
|
||||||
@@ -1706,6 +1718,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
<div class="test-mock-item-toolbar">
|
||||||
|
<q-btn
|
||||||
|
color="negative"
|
||||||
|
outline
|
||||||
|
label="Remove"
|
||||||
|
@click="removeTestMockBindingItem(testEntry, mockSet, activeTestMockBinding(mockSet), itemIndex)"
|
||||||
|
></q-btn>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="testMockItemHasSkip(item)" class="q-mb-md">
|
<div v-if="testMockItemHasSkip(item)" class="q-mb-md">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
:model-value="testMockItemSkip(item)"
|
:model-value="testMockItemSkip(item)"
|
||||||
@@ -1789,7 +1810,7 @@
|
|||||||
<q-btn
|
<q-btn
|
||||||
color="primary"
|
color="primary"
|
||||||
outline
|
outline
|
||||||
label="Add Object"
|
label="Add Function Mock"
|
||||||
:disable="!activeTestMockBinding(mockSet)"
|
:disable="!activeTestMockBinding(mockSet)"
|
||||||
@click="addTestMockBindingItem(testEntry, mockSet, activeTestMockBinding(mockSet))"
|
@click="addTestMockBindingItem(testEntry, mockSet, activeTestMockBinding(mockSet))"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
@@ -4005,15 +4026,6 @@
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
testMockItemTitle(item, itemIndex) {
|
|
||||||
const description = item?.descriptionText || ''
|
|
||||||
|
|
||||||
if (typeof description === 'string' && description.trim() !== '') {
|
|
||||||
return description.trim()
|
|
||||||
}
|
|
||||||
|
|
||||||
return `Test Mock Definition ${itemIndex + 1}`
|
|
||||||
},
|
|
||||||
testMockItemHasSkip(item) {
|
testMockItemHasSkip(item) {
|
||||||
return Boolean(item?.hasSkipField || item?.skip === true)
|
return Boolean(item?.hasSkipField || item?.skip === true)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user