refactor: add id for test
This commit is contained in:
parent
fce11a9a9b
commit
d2ff5c81ba
10 changed files with 31 additions and 5 deletions
|
|
@ -199,6 +199,7 @@ async function submitFileForm(
|
|||
;(folderFormState = false), getFolder(value.pathname)
|
||||
}
|
||||
"
|
||||
:id="`getFolderFileItem${index}`"
|
||||
>
|
||||
<div class="q-px-md flex items-center justify-center">
|
||||
<q-icon
|
||||
|
|
@ -243,6 +244,7 @@ async function submitFileForm(
|
|||
padding: currentDept > 2 ? '.5rem 0' : '.5rem',
|
||||
}"
|
||||
@click="() => triggerFolderCreate()"
|
||||
id="triggerFolderCreateFileItem"
|
||||
>
|
||||
<div
|
||||
class="q-px-md flex items-center justify-center"
|
||||
|
|
@ -286,7 +288,7 @@ async function submitFileForm(
|
|||
เอกสาร
|
||||
</div>
|
||||
<div class="grid q-mt-md">
|
||||
<div v-for="value in currentFile">
|
||||
<div v-for="value,index in currentFile">
|
||||
<div
|
||||
:style="{
|
||||
position: 'relative',
|
||||
|
|
@ -299,6 +301,7 @@ async function submitFileForm(
|
|||
}"
|
||||
class="box"
|
||||
@click="() => getFileInfo(value)"
|
||||
:id="`getFileInfoFileItem${index}`"
|
||||
>
|
||||
<div class="q-px-md flex items-center justify-center">
|
||||
<file-icon
|
||||
|
|
@ -347,6 +350,7 @@ async function submitFileForm(
|
|||
}"
|
||||
class="dashed"
|
||||
@click="() => triggerFileCreate()"
|
||||
id="triggerFileCreateFileItem"
|
||||
>
|
||||
<div
|
||||
class="q-px-md flex items-center justify-center"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ defineEmits(['edit', 'delete'])
|
|||
<q-btn @click.stop icon="more_vert" color="grey" flat dense>
|
||||
<q-menu auto-close>
|
||||
<q-list dense>
|
||||
<q-item clickable @click="() => $emit('edit')">
|
||||
<q-item clickable @click="() => $emit('edit')" id="FileltemActionEdit">
|
||||
<q-item-section>
|
||||
<div class="row items-center white ">
|
||||
<q-icon name="edit" color="positive" />
|
||||
|
|
@ -14,7 +14,7 @@ defineEmits(['edit', 'delete'])
|
|||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable @click="() => $emit('delete')">
|
||||
<q-item clickable @click="() => $emit('delete')" id="FileltemActiondelete">
|
||||
<q-item-section>
|
||||
<div class="row items-center white ">
|
||||
<q-icon name="delete" color="negative" />
|
||||
|
|
|
|||
|
|
@ -138,7 +138,8 @@ onMounted(() => {
|
|||
maxWidth: '100%',
|
||||
}"
|
||||
class="box"
|
||||
@click="() => getFileInfo(filterFoundFile[index])"
|
||||
@click="() => getFileInfo(foundFile[index])"
|
||||
:id="`getFileInfoFileSearched${index}`"
|
||||
>
|
||||
<div class="q-px-md flex items-center justify-center">
|
||||
<file-icon
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ onUnmounted(() => window.addEventListener('keydown', keydown))
|
|||
$emit('update:open', !open)
|
||||
}
|
||||
"
|
||||
id="folderFormIconClose"
|
||||
/>
|
||||
</q-toolbar>
|
||||
|
||||
|
|
@ -98,11 +99,12 @@ onUnmounted(() => window.addEventListener('keydown', keydown))
|
|||
offensiveWord = checkOffensiveWord(v as string)
|
||||
}
|
||||
"
|
||||
id="folderNameInput"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section :style="{ display: 'flex', gap: '.5rem' }">
|
||||
<q-btn label="บันทึก" type="submit" color="primary" />
|
||||
<q-btn label="บันทึก" type="submit" color="primary" id="FoldeSubmit" />
|
||||
<q-btn
|
||||
label="ยกเลิก"
|
||||
type="reset"
|
||||
|
|
@ -114,6 +116,7 @@ onUnmounted(() => window.addEventListener('keydown', keydown))
|
|||
$emit('update:open', false), reset()
|
||||
}
|
||||
"
|
||||
id="folderBtnCancel"
|
||||
/>
|
||||
</section>
|
||||
</q-form>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ watch(visible, () => {
|
|||
v-close-popup
|
||||
label="ปิด"
|
||||
@click="() => (visible = !visible)"
|
||||
id="globalErrorClose"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
dense
|
||||
icon="add"
|
||||
@click="() => triggerFolderCreate()"
|
||||
id="listViewFolderCreate"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -333,6 +334,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
actionsRow.row.pathname
|
||||
)
|
||||
"
|
||||
id="listViewFolderEdit"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
|
|
@ -340,6 +342,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
dense
|
||||
icon="delete"
|
||||
@click.stop="triggerFolderDelete(actionsRow.row.pathname)"
|
||||
id="listViewFolderDelete"
|
||||
/>
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
@ -366,6 +369,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
dense
|
||||
icon="add"
|
||||
@click="() => triggerFileCreate()"
|
||||
id="listViewFileCreate"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -389,6 +393,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
: getFolder(nameRow.row.pathname)
|
||||
}
|
||||
"
|
||||
id="listViewGetFileInfo"
|
||||
>
|
||||
<file-icon size="list" :fileMimeType="nameRow.row.fileType" />
|
||||
{{ nameRow.row.fileName }}
|
||||
|
|
@ -424,6 +429,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
@click="
|
||||
() => triggerFileEdit(actionsRow.row, actionsRow.row.pathname)
|
||||
"
|
||||
id="listViewFileEdit"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
|
|
@ -431,6 +437,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
dense
|
||||
icon="delete"
|
||||
@click="() => triggerFileDelete(actionsRow.row.pathname)"
|
||||
id="listViewFileDelete"
|
||||
/>
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ onMounted(getCabinet)
|
|||
gotoParent()
|
||||
}
|
||||
"
|
||||
id="btnGoback"
|
||||
>
|
||||
<q-icon name="arrow_back" size="1rem" color="primary" />
|
||||
</q-btn>
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ function clearAdvSearchData() {
|
|||
color="red"
|
||||
icon="close"
|
||||
@click="clearAdvSearchData"
|
||||
id="clearAdvSearchData"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
@ -124,6 +125,7 @@ function clearAdvSearchData() {
|
|||
icon="mdi-plus"
|
||||
v-if="index === advSearchDataRow.length - 1"
|
||||
@click="addAdvSearchData"
|
||||
id="addAdvSearchData"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 col-md-2">
|
||||
|
|
@ -172,6 +174,7 @@ function clearAdvSearchData() {
|
|||
icon="mdi-trash-can-outline"
|
||||
color="red"
|
||||
@click="() => delAdvSearchData(index)"
|
||||
id="delAdvSearchData"
|
||||
>
|
||||
<q-tooltip
|
||||
class="bg-red"
|
||||
|
|
@ -220,6 +223,7 @@ function clearAdvSearchData() {
|
|||
label="ค้นหา"
|
||||
icon="mdi-magnify"
|
||||
@click="() => props.searchSubmit()"
|
||||
id="advSearchSubmit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ async function downloadSubmit(path: any) {
|
|||
dense
|
||||
class="q-mr-sm q-px-sm"
|
||||
@click="() => (isFilePreview = false)"
|
||||
id="goBackInfo"
|
||||
>
|
||||
<q-icon
|
||||
class="pointer"
|
||||
|
|
@ -95,6 +96,7 @@ async function downloadSubmit(path: any) {
|
|||
icon="mdi-download"
|
||||
class="q-py-sm"
|
||||
@click="() => downloadSubmit(fileInfo?.pathname)"
|
||||
id="downloadSubmit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ async function searchSubmit() {
|
|||
v-model="searchData.value"
|
||||
id="inputSearch"
|
||||
@keydown.enter.prevent="searchSubmit"
|
||||
|
||||
>
|
||||
<template v-slot:append><q-icon name="search" /></template>
|
||||
</q-input>
|
||||
|
|
@ -141,6 +142,7 @@ async function searchSubmit() {
|
|||
name="close"
|
||||
@click="() => ((searchData.value = ''), (isSearch = false))"
|
||||
class="cursor-pointer"
|
||||
id="clearSearchData"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -163,6 +165,7 @@ async function searchSubmit() {
|
|||
label="ค้นหา"
|
||||
icon="mdi-magnify"
|
||||
@click="searchSubmit"
|
||||
id="searchSubmit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue