Browse Source

Merge branch 'develop' into enhancement/filters

pull/4969/head
Wing-Kam Wong 2 years ago
parent
commit
2a681488c8
  1. 2
      .github/workflows/ci-cd.yml
  2. 250
      packages/nc-gui/components/smartsheet/Gallery.vue
  3. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  4. 59
      packages/nc-gui/components/smartsheet/expanded-form/Header.vue
  5. 29
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  6. 2
      packages/nc-gui/components/smartsheet/header/Menu.vue
  7. 1
      packages/nc-gui/composables/useViewData.ts
  8. 2
      packages/nc-gui/lang/ar.json
  9. 2
      packages/nc-gui/lang/bn_IN.json
  10. 4
      packages/nc-gui/lang/cs.json
  11. 2
      packages/nc-gui/lang/da.json
  12. 2
      packages/nc-gui/lang/de.json
  13. 2
      packages/nc-gui/lang/en.json
  14. 2
      packages/nc-gui/lang/es.json
  15. 2
      packages/nc-gui/lang/eu.json
  16. 2
      packages/nc-gui/lang/fa.json
  17. 2
      packages/nc-gui/lang/fi.json
  18. 2
      packages/nc-gui/lang/fr.json
  19. 2
      packages/nc-gui/lang/he.json
  20. 2
      packages/nc-gui/lang/hi.json
  21. 2
      packages/nc-gui/lang/hr.json
  22. 2
      packages/nc-gui/lang/id.json
  23. 2
      packages/nc-gui/lang/it.json
  24. 2
      packages/nc-gui/lang/ja.json
  25. 2
      packages/nc-gui/lang/ko.json
  26. 2
      packages/nc-gui/lang/lv.json
  27. 2
      packages/nc-gui/lang/nl.json
  28. 2
      packages/nc-gui/lang/no.json
  29. 2
      packages/nc-gui/lang/pl.json
  30. 2
      packages/nc-gui/lang/pt.json
  31. 2
      packages/nc-gui/lang/pt_BR.json
  32. 2
      packages/nc-gui/lang/ru.json
  33. 2
      packages/nc-gui/lang/sk.json
  34. 2
      packages/nc-gui/lang/sl.json
  35. 2
      packages/nc-gui/lang/sv.json
  36. 2
      packages/nc-gui/lang/th.json
  37. 2
      packages/nc-gui/lang/tr.json
  38. 2
      packages/nc-gui/lang/uk.json
  39. 2
      packages/nc-gui/lang/vi.json
  40. 2
      packages/nc-gui/lang/zh-Hans.json
  41. 2
      packages/nc-gui/lang/zh-Hant.json
  42. 33
      tests/playwright/pages/Dashboard/ExpandedForm/index.ts
  43. 3
      tests/playwright/scripts/docker-compose-mysql-playwright.yml
  44. 48
      tests/playwright/tests/expandedFormUrl.spec.ts

2
.github/workflows/ci-cd.yml

@ -27,7 +27,7 @@ concurrency:
jobs:
unit-tests:
runs-on: ubuntu-20.04
timeout-minutes: 30
timeout-minutes: 40
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps:
- name: Setup Node

250
packages/nc-gui/components/smartsheet/Gallery.vue

@ -51,6 +51,7 @@ const {
galleryData,
changePage,
addEmptyRow,
deleteRow,
navigateToSiblingRow,
} = useViewData(meta, view)
@ -85,6 +86,30 @@ const isRowEmpty = (record: any, col: any) => {
return Array.isArray(val) && val.length === 0
}
const { isSqlView } = useSmartsheetStoreOrThrow()
const { isUIAllowed } = useUIPermission()
const hasEditPermission = $computed(() => isUIAllowed('xcDatatableEditable'))
// TODO: extract this code (which is duplicated in grid and gallery) into a separate component
const _contextMenu = ref(false)
const contextMenu = computed({
get: () => _contextMenu.value,
set: (val) => {
if (hasEditPermission) {
_contextMenu.value = val
}
},
})
const contextMenuTarget = ref<{ row: number } | null>(null)
const showContextMenu = (e: MouseEvent, target?: { row: number }) => {
if (isSqlView.value) return
e.preventDefault()
if (target) {
contextMenuTarget.value = target
}
}
const attachments = (record: any): Attachment[] => {
try {
if (coverImageColumn?.title && record.row[coverImageColumn.title]) {
@ -175,113 +200,138 @@ watch(view, async (nextView) => {
</script>
<template>
<div class="flex flex-col h-full w-full overflow-auto nc-gallery" data-testid="nc-gallery-wrapper">
<div class="nc-gallery-container grid gap-2 my-4 px-3">
<div v-for="record in data" :key="`record-${record.row.id}`">
<LazySmartsheetRow :row="record">
<a-card
hoverable
class="!rounded-lg h-full overflow-hidden break-all max-w-[450px]"
:data-testid="`nc-gallery-card-${record.row.id}`"
@click="expandFormClick($event, record)"
>
<template v-if="galleryData?.fk_cover_image_col_id" #cover>
<a-carousel v-if="!reloadAttachments && attachments(record).length" autoplay class="gallery-carousel" arrows>
<template #customPaging>
<a>
<div class="pt-[12px]">
<div></div>
<a-dropdown
v-model:visible="contextMenu"
:trigger="isSqlView ? [] : ['contextmenu']"
overlay-class-name="nc-dropdown-grid-context-menu"
>
<template #overlay>
<a-menu class="shadow !rounded !py-0" @click="contextMenu = false">
<a-menu-item v-if="contextMenuTarget" @click="deleteRow(contextMenuTarget.row)">
<div v-e="['a:row:delete']" class="nc-project-menu-item">
<!-- Delete Row -->
{{ $t('activity.deleteRow') }}
</div>
</a-menu-item>
<a-menu-item v-if="contextMenuTarget" @click="openNewRecordFormHook.trigger()">
<div v-e="['a:row:insert']" class="nc-project-menu-item">
<!-- Insert New Row -->
{{ $t('activity.insertRow') }}
</div>
</a-menu-item>
</a-menu>
</template>
<div class="flex flex-col h-full w-full overflow-auto nc-gallery" data-testid="nc-gallery-wrapper">
<div class="nc-gallery-container grid gap-2 my-4 px-3">
<div v-for="(record, rowIndex) in data" :key="`record-${record.row.id}`">
<LazySmartsheetRow :row="record">
<a-card
hoverable
class="!rounded-lg h-full overflow-hidden break-all max-w-[450px]"
:data-testid="`nc-gallery-card-${record.row.id}`"
@click="expandFormClick($event, record)"
@contextmenu="showContextMenu($event, { row: rowIndex })"
>
<template v-if="galleryData?.fk_cover_image_col_id" #cover>
<a-carousel v-if="!reloadAttachments && attachments(record).length" autoplay class="gallery-carousel" arrows>
<template #customPaging>
<a>
<div class="pt-[12px]">
<div></div>
</div>
</a>
</template>
<template #prevArrow>
<div style="z-index: 1"></div>
</template>
<template #nextArrow>
<div style="z-index: 1"></div>
</template>
<template v-for="(attachment, index) in attachments(record)">
<LazyCellAttachmentImage
v-if="isImage(attachment.title, attachment.mimetype ?? attachment.type)"
:key="`carousel-${record.row.id}-${index}`"
class="h-52 object-contain"
:srcs="getPossibleAttachmentSrc(attachment)"
/>
</template>
</a-carousel>
<MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" />
</template>
<div v-for="col in fieldsWithoutCover" :key="`record-${record.row.id}-${col.id}`">
<div
v-if="!isRowEmpty(record, col) || isLTAR(col.uidt)"
class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full"
>
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
<div class="w-full text-gray-600">
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
</div>
</a>
</template>
<template #prevArrow>
<div style="z-index: 1"></div>
</template>
<template #nextArrow>
<div style="z-index: 1"></div>
</template>
<template v-for="(attachment, index) in attachments(record)">
<LazyCellAttachmentImage
v-if="isImage(attachment.title, attachment.mimetype ?? attachment.type)"
:key="`carousel-${record.row.id}-${index}`"
class="h-52 object-contain"
:srcs="getPossibleAttachmentSrc(attachment)"
/>
</template>
</a-carousel>
<MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" />
</template>
<div v-for="col in fieldsWithoutCover" :key="`record-${record.row.id}-${col.id}`">
<div
v-if="!isRowEmpty(record, col) || isLTAR(col.uidt)"
class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full"
>
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
<div class="w-full text-gray-600">
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
</div>
</div>
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
<LazySmartsheetVirtualCell
v-if="isVirtualCol(col)"
v-model="record.row[col.title]"
:column="col"
:row="record"
/>
<LazySmartsheetCell
v-else
v-model="record.row[col.title]"
:column="col"
:edit-enabled="false"
:read-only="true"
/>
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
<LazySmartsheetVirtualCell
v-if="isVirtualCol(col)"
v-model="record.row[col.title]"
:column="col"
:row="record"
/>
<LazySmartsheetCell
v-else
v-model="record.row[col.title]"
:column="col"
:edit-enabled="false"
:read-only="true"
/>
</div>
</div>
</div>
</div>
</a-card>
</LazySmartsheetRow>
</a-card>
</LazySmartsheetRow>
</div>
</div>
</div>
<div class="flex-1" />
<LazySmartsheetPagination />
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg"
:row="expandedFormRow"
:state="expandedFormRowState"
:meta="meta"
:view="view"
/>
</Suspense>
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
:key="route.query.rowId"
v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }"
:meta="meta"
:row-id="route.query.rowId"
:view="view"
show-next-prev-icons
@next="navigateToSiblingRow(NavigateDir.NEXT)"
@prev="navigateToSiblingRow(NavigateDir.PREV)"
/>
</Suspense>
</div>
<div class="flex-1" />
<LazySmartsheetPagination />
</div>
</a-dropdown>
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg"
:row="expandedFormRow"
:state="expandedFormRowState"
:meta="meta"
:view="view"
/>
</Suspense>
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
:key="route.query.rowId"
v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }"
:meta="meta"
:row-id="route.query.rowId"
:view="view"
show-next-prev-icons
@next="navigateToSiblingRow(NavigateDir.NEXT)"
@prev="navigateToSiblingRow(NavigateDir.PREV)"
/>
</Suspense>
</template>
<style scoped>

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -793,7 +793,7 @@ const closeAddColumnDropdown = () => {
class="nc-row-no text-xs text-gray-500"
:class="{ toggle: !readOnly, hidden: row.rowMeta.selected }"
>
{{ rowIndex + 1 }}
{{ ((paginationData.page ?? 1) - 1) * 25 + rowIndex + 1 }}
</div>
<div
v-if="!readOnly"

59
packages/nc-gui/components/smartsheet/expanded-form/Header.vue

@ -12,7 +12,7 @@ import {
const props = defineProps<{ view?: ViewType }>()
const emit = defineEmits(['cancel'])
const emit = defineEmits(['cancel', 'duplicateRow'])
const route = useRoute()
@ -72,6 +72,22 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
}
}
})
const showDeleteRowModal = ref(false)
const { deleteRowById } = useViewData(meta, ref(props.view))
const onDeleteRowClick = () => {
showDeleteRowModal.value = true
}
const onConfirmDeleteRowClick = async () => {
showDeleteRowModal.value = false
await deleteRowById(primaryKey.value)
reloadTrigger.trigger()
emit('cancel')
message.success('Row deleted')
}
</script>
<template>
@ -127,6 +143,47 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
</div>
</a-button>
<a-dropdown>
<a-button v-e="['c:actions']" class="nc-actions-menu-btn nc-toolbar-btn">
<div class="flex gap-1 items-center">
<!-- More -->
<span class="!text-sm font-weight-medium">{{ $t('general.more') }}</span>
<MdiMenuDown class="text-grey" />
</div>
</a-button>
<template #overlay>
<div class="bg-gray-50 py-2 shadow-lg !border">
<div>
<div
v-e="['a:actions:duplicate-row']"
class="nc-menu-item"
:class="{ disabled: isNew }"
@click="!isNew && emit('duplicateRow')"
>
<MdiContentCopy class="text-gray-500" />
{{ $t('activity.duplicateRow') }}
</div>
<a-modal v-model:visible="showDeleteRowModal" title="Delete row?" @ok="onConfirmDeleteRowClick">
<p>Are you sure you want to delete this row?</p>
</a-modal>
<div
v-e="['a:actions:delete-row']"
class="nc-menu-item"
:class="{ disabled: isNew }"
@click="!isNew && onDeleteRowClick()"
>
<MdiDelete class="text-gray-500" />
{{ $t('activity.deleteRow') }}
</div>
</div>
</div>
</template>
</a-dropdown>
<a-dropdown-button class="nc-expand-form-save-btn" type="primary" :disabled="!isUIAllowed('tableRowUpdate')" @click="save">
<template #overlay>
<a-menu class="nc-expand-form-save-dropdown-menu">

29
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -39,6 +39,8 @@ const props = defineProps<Props>()
const emits = defineEmits(['update:modelValue', 'cancel', 'next', 'prev'])
const { t } = useI18n()
const row = ref(props.row)
const state = toRef(props, 'state')
@ -60,6 +62,8 @@ provide(MetaInj, meta)
const { commentsDrawer, changedColumns, state: rowState, isNew, loadRow } = useProvideExpandedFormStore(meta, row)
const duplicatingRowInProgress = ref(false)
if (props.loadRow) {
await loadRow()
}
@ -101,6 +105,23 @@ const onClose = () => {
isExpanded.value = false
}
const onDuplicateRow = () => {
duplicatingRowInProgress.value = true
const newRow = Object.assign(
{},
{
row: row.value.row,
oldRow: {},
rowMeta: { new: true },
},
)
setTimeout(async () => {
row.value = newRow
duplicatingRowInProgress.value = false
message.success(t('msg.success.rowDuplicatedWithoutSavedYet'))
}, 500)
}
const reloadParentRowHook = inject(ReloadRowDataHookInj, createEventHook())
// override reload trigger and use it to reload grid and the form itself
@ -148,7 +169,7 @@ export default {
class="nc-drawer-expanded-form"
:class="{ active: isExpanded }"
>
<SmartsheetExpandedFormHeader :view="props.view" @cancel="onClose" />
<SmartsheetExpandedFormHeader :view="props.view" @cancel="onClose" @duplicate-row="onDuplicateRow" />
<div class="!bg-gray-100 rounded flex-1 relative">
<template v-if="props.showNextPrevIcons">
@ -169,8 +190,12 @@ export default {
<div class="flex h-full nc-form-wrapper items-stretch min-h-[max(70vh,100%)]">
<div class="flex-1 overflow-auto scrollbar-thin-dull nc-form-fields-container">
<div class="w-[500px] mx-auto">
<div v-if="duplicatingRowInProgress" class="flex items-center justify-center h-[100px]">
<a-spin size="large" />
</div>
<div
v-for="(col, i) of fields"
v-else
v-show="!isVirtualCol(col) || !isNew || col.uidt === UITypes.LinkToAnotherRecord"
:key="col.title"
class="mt-2 py-2"
@ -237,9 +262,11 @@ export default {
.nc-next-arrow {
@apply absolute opacity-70 rounded-full transition-transform transition-background transition-opacity transform bg-white hover:(bg-gray-200) active:(scale-125 opacity-100) text-xl;
}
.nc-prev-arrow {
@apply left-4 top-4;
}
.nc-next-arrow {
@apply right-4 top-4;
}

2
packages/nc-gui/components/smartsheet/header/Menu.vue

@ -280,7 +280,7 @@ const hideField = async () => {
</a-menu-item>
<a-divider class="!my-0" />
<a-menu-item v-if="!virtual && !column?.pv" @click="setAsPrimaryValue">
<a-menu-item v-if="(!virtual || column?.uidt === UITypes.Formula) && !column?.pv" @click="setAsPrimaryValue">
<div class="nc-column-set-primary nc-header-menu-item">
<MdiStar class="text-primary" />

1
packages/nc-gui/composables/useViewData.ts

@ -546,5 +546,6 @@ export function useViewData(
removeLastEmptyRow,
removeRowIfNew,
navigateToSiblingRow,
deleteRowById,
}
}

2
packages/nc-gui/lang/ar.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "إدراج صف جديد",
"deleteRow": "حذف الصف",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "حذف الصفوف المحددة",
"importExcel": "استيراد Excel",
"importCSV": "استيراد CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "تم تحديث ACL واجهة المستخدم للجداول بنجاح",
"pluginUninstalled": "تم إلغاء تثبيت الإضافة بنجاح",
"pluginSettingsSaved": "تم حفظ إعدادات الإضافة بنجاح",

2
packages/nc-gui/lang/bn_IN.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "নতন সিন",
"deleteRow": "সিন",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "নিিত সিিন",
"importExcel": "একল আমদি করন",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

4
packages/nc-gui/lang/cs.json

@ -206,7 +206,7 @@
"advancedSettings": "Pokročilá nastavení",
"codeSnippet": "Úryvek kódu",
"keyboardShortcut": "Klávesové zkratky",
"generateRandomName": "Generate Random Name"
"generateRandomName": "Vytvořit náhodné jméno"
},
"labels": {
"createdBy": "Vytvořil/a",
@ -387,6 +387,7 @@
"saveAndStay": "Uložit a zůstat",
"insertRow": "Vložit nový řádek",
"deleteRow": "Odstranit řádek",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Odstranit vybrané řádky",
"importExcel": "Importovat Excel",
"importCSV": "Importovat CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Sloupec úspěšně duplikován",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Úspěšná aktualizace uživatelského rozhraní ACL pro tabulky",
"pluginUninstalled": "Plugin byl úspěšně odinstalován",
"pluginSettingsSaved": "Nastavení zásuvného modulu bylo úspěšně uloženo",

2
packages/nc-gui/lang/da.json

@ -387,6 +387,7 @@
"saveAndStay": "Gem og bliv",
"insertRow": "Indsæt ny række",
"deleteRow": "DELETE ROW.",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Slet de valgte rækker",
"importExcel": "Import Excel.",
"importCSV": "Import CSV.",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Kolonne duplikeret med succes",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Opdateret UI ACL for tabeller med succes",
"pluginUninstalled": "Plugin afinstalleret med succes",
"pluginSettingsSaved": "Plugin-indstillingerne er gemt med succes",

2
packages/nc-gui/lang/de.json

@ -387,6 +387,7 @@
"saveAndStay": "Speichern & Bleiben",
"insertRow": "Neue Zeile einfügen",
"deleteRow": "Zeile löschen",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Ausgewählte Zeilen löschen",
"importExcel": "Excel-Datei importieren",
"importCSV": "CSV-Datei importieren",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Spalte erfolgreich dupliziert",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "UI ACL für Tabellen erfolgreich aktualisiert",
"pluginUninstalled": "Plugin erfolgreich deinstalliert",
"pluginSettingsSaved": "Plugin-Einstellungen erfolgreich gespeichert",

2
packages/nc-gui/lang/en.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "Insert New Row",
"deleteRow": "Delete Row",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Delete Selected Rows",
"importExcel": "Import Excel",
"importCSV": "Import CSV",
@ -721,6 +722,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/es.json

@ -387,6 +387,7 @@
"saveAndStay": "Ahorrar y quedarse",
"insertRow": "Insertar nueva fila",
"deleteRow": "Borrar fila",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Eliminar filas seleccionadas",
"importExcel": "Importar Excel",
"importCSV": "Importar CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Columna duplicada con éxito",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Actualizada con éxito la interfaz de usuario ACL para las tablas",
"pluginUninstalled": "Plugin desinstalado correctamente",
"pluginSettingsSaved": "La configuración del plugin se ha guardado correctamente",

2
packages/nc-gui/lang/eu.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "Insert New Row",
"deleteRow": "Delete Row",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Delete Selected Rows",
"importExcel": "Import Excel",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/fa.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "وارد کردن ردیف جدید",
"deleteRow": "حذف ردیف جدید",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "حذف ردیفهای انتخاب شده",
"importExcel": "وارد کردن فایل Excel",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/fi.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "Lisää uusi rivi",
"deleteRow": "Poista rivi",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Poista valitut rivit",
"importExcel": "Tuonti excel",
"importCSV": "Tuo CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Sarake monistettu onnistuneesti",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Päivitetty UI ACL taulukoille onnistuneesti",
"pluginUninstalled": "Liitännäisen poisto onnistui onnistuneesti",
"pluginSettingsSaved": "Liitännäisen asetukset tallennettu onnistuneesti",

2
packages/nc-gui/lang/fr.json

@ -387,6 +387,7 @@
"saveAndStay": "Enregistrer et rester",
"insertRow": "Insérer une nouvelle ligne",
"deleteRow": "Supprimer la ligne",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Supprimer les lignes sélectionnées",
"importExcel": "Importer depuis Excel",
"importCSV": "Importer un fichier CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Colonne dupliquée avec succès",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Mise à jour réussie de l'ACL de l'interface utilisateur pour les tables",
"pluginUninstalled": "Le plugin a été désinstallé avec succès",
"pluginSettingsSaved": "Les paramètres du plugin ont été enregistrés avec succès",

2
packages/nc-gui/lang/he.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "הכנס שורה חדשה",
"deleteRow": "מחק שורה",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "מחק את השורות שנבחרו",
"importExcel": "ייבוא Excel",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/hi.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "नई पि",
"deleteRow": "पि हट",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "चयनित पि हट",
"importExcel": "आयत एकल",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/hr.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "Umetnite novi red",
"deleteRow": "Brisanje retka",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Izbrišite odabrane retke",
"importExcel": "Uvoz Excel",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/id.json

@ -387,6 +387,7 @@
"saveAndStay": "Simpan & Menginap",
"insertRow": "Masukkan baris baru.",
"deleteRow": "Hapus Baris",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Hapus baris yang dipilih",
"importExcel": "Impor Excel.",
"importCSV": "Impor CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Kolom berhasil diduplikasi",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Berhasil memperbarui ACL UI untuk tabel",
"pluginUninstalled": "Plugin berhasil dihapus instalasinya",
"pluginSettingsSaved": "Pengaturan plugin berhasil disimpan",

2
packages/nc-gui/lang/it.json

@ -387,6 +387,7 @@
"saveAndStay": "Risparmia e resta",
"insertRow": "Inserisci nuova riga",
"deleteRow": "Elimina riga.",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Elimina righe selezionate",
"importExcel": "Importa Excel.",
"importCSV": "Importazione CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Colonna duplicata con successo",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Aggiornamento dell'UI ACL per le tabelle con successo",
"pluginUninstalled": "Il plugin è stato disinstallato con successo",
"pluginSettingsSaved": "Le impostazioni del plugin sono state salvate con successo",

2
packages/nc-gui/lang/ja.json

@ -387,6 +387,7 @@
"saveAndStay": "保存して続ける",
"insertRow": "行を挿入",
"deleteRow": "行を削除",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "選択行を削除",
"importExcel": "エクセルファイルをインポート",
"importCSV": "CSV のインポート",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "カラムを複製しました",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "テーブルの UI ACL を更新しました",
"pluginUninstalled": "プラグインをアンインストールしました",
"pluginSettingsSaved": "プラグインの設定を保存しました",

2
packages/nc-gui/lang/ko.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "행 삽입",
"deleteRow": "행 삭제",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "선택한 행 삭제",
"importExcel": "엑셀 가져오기",
"importCSV": "CSV 가져오기",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/lv.json

@ -387,6 +387,7 @@
"saveAndStay": "Saglabāt un palikt",
"insertRow": "Pievienot jaunu ierakstu",
"deleteRow": "Dzēst ierakstu",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Dzēst izvēlētos ierakstus",
"importExcel": "Importēt Excel",
"importCSV": "CSV importēšana",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Sekmīgi dublēta sleja",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Veiksmīgi atjaunināts UI ACL tabulām",
"pluginUninstalled": "Spraudnis veiksmīgi atinstalēts",
"pluginSettingsSaved": "Veiksmīgi saglabāti spraudņa iestatījumi",

2
packages/nc-gui/lang/nl.json

@ -387,6 +387,7 @@
"saveAndStay": "Sparen & Blijven",
"insertRow": "Voeg nieuwe rij toe",
"deleteRow": "Verwijder rij",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Verwijder geselecteerde rijen",
"importExcel": "Excel importeren",
"importCSV": "CSV importeren",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Kolom succesvol gedupliceerd",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "UI ACL voor tabellen met succes bijgewerkt",
"pluginUninstalled": "Plugin succesvol verwijderd",
"pluginSettingsSaved": "Plugin-instellingen succesvol opgeslagen",

2
packages/nc-gui/lang/no.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "Sett inn ny rad",
"deleteRow": "Slett rad",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Slett utvalgte rader",
"importExcel": "Importer Excel.",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/pl.json

@ -387,6 +387,7 @@
"saveAndStay": "Oszczędzaj i zostań",
"insertRow": "Wstaw nowy rząd",
"deleteRow": "Usuń rząd",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Usuń wybrane wiersze",
"importExcel": "Importuj Excel.",
"importCSV": "Importuj z CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Kolumna powielona z powodzeniem",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Pomyślnie zaktualizowano UI ACL dla tabel",
"pluginUninstalled": "Wtyczka odinstalowana pomyślnie",
"pluginSettingsSaved": "Ustawienia wtyczki zapisane pomyślnie",

2
packages/nc-gui/lang/pt.json

@ -387,6 +387,7 @@
"saveAndStay": "Salvar & Ficar",
"insertRow": "Insira a nova linha",
"deleteRow": "Excluir linha",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Excluir linhas selecionadas",
"importExcel": "Importar Excel.",
"importCSV": "Importar CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Coluna duplicada com sucesso",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "UI ACL actualizada para tabelas com sucesso",
"pluginUninstalled": "Plugin desinstalado com sucesso",
"pluginSettingsSaved": "Configurações de plugin guardadas com sucesso",

2
packages/nc-gui/lang/pt_BR.json

@ -387,6 +387,7 @@
"saveAndStay": "Salvar & Ficar",
"insertRow": "Insira a nova linha",
"deleteRow": "Excluir linha",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Excluir linhas selecionadas",
"importExcel": "Importar Excel.",
"importCSV": "Importar CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Coluna duplicada com sucesso",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "UI ACL actualizada para tabelas com sucesso",
"pluginUninstalled": "Plugin desinstalado com sucesso",
"pluginSettingsSaved": "Configurações de plugin guardadas com sucesso",

2
packages/nc-gui/lang/ru.json

@ -387,6 +387,7 @@
"saveAndStay": "Сохранить и остаться",
"insertRow": "Вставить новую строку",
"deleteRow": "Удалить строку",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Удалить выбранные строки",
"importExcel": "Импорт из Excel",
"importCSV": "Импорт CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Столбец успешно скопирован",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Успешно обновлен пользовательский интерфейс ACL для таблиц",
"pluginUninstalled": "Плагин успешно удален",
"pluginSettingsSaved": "Настройки плагина сохранены",

2
packages/nc-gui/lang/sk.json

@ -387,6 +387,7 @@
"saveAndStay": "Uložiť a zostať",
"insertRow": "Vložiť nový riadok",
"deleteRow": "Odstrániť riadok",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Odstránenie vybraných riadkov",
"importExcel": "Importovať aplikáciu Excel",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Stĺpec bol úspešne duplikovaný",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Úspešne aktualizované používateľské rozhranie ACL pre tabuľky",
"pluginUninstalled": "Plugin úspešne odinštalovaný",
"pluginSettingsSaved": "Nastavenia zásuvného modulu boli úspešne uložené",

2
packages/nc-gui/lang/sl.json

@ -387,6 +387,7 @@
"saveAndStay": "Shranjevanje in bivanje",
"insertRow": "Vstavite novo vrstico",
"deleteRow": "Izbriši vrstico",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Izbrišite izbrane vrstice",
"importExcel": "Uvoz Excel.",
"importCSV": "Uvoz CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Stolpec je bil uspešno podvojen",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Uspešno posodobljen uporabniški vmesnik ACL za tabele",
"pluginUninstalled": "Vtičnik uspešno odstranjen",
"pluginSettingsSaved": "Nastavitve vtičnika so bile uspešno shranjene",

2
packages/nc-gui/lang/sv.json

@ -387,6 +387,7 @@
"saveAndStay": "Spara och stanna",
"insertRow": "Infoga ny rad",
"deleteRow": "Radera raden",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Ta bort valda rader",
"importExcel": "Import excel",
"importCSV": "Importera CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Kolumnen duplicerades framgångsrikt",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Uppdaterade UI ACL för tabeller framgångsrikt",
"pluginUninstalled": "Plugin avinstallerades framgångsrikt",
"pluginSettingsSaved": "Plugin-inställningarna har sparats framgångsrikt",

2
packages/nc-gui/lang/th.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "แทรกแถวใหม",
"deleteRow": "ลบแถว",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "ลบแถวทเลอก",
"importExcel": "นำเขา Excel",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/tr.json

@ -387,6 +387,7 @@
"saveAndStay": "Kaydet ve Kal",
"insertRow": "Yeni Satır Ekle",
"deleteRow": "Satırı Sil",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Seçilen Satırları Sil",
"importExcel": "Excel içe aktar",
"importCSV": "CSV içe aktar",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Sütun başarıyla çoğaltıldı",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Tablolar için UI ACL başarıyla güncellendi",
"pluginUninstalled": "Eklenti başarıyla kaldırıldı",
"pluginSettingsSaved": "Eklenti ayarları başarıyla kaydedildi",

2
packages/nc-gui/lang/uk.json

@ -387,6 +387,7 @@
"saveAndStay": "Зберегти та залишитись",
"insertRow": "Вставити новий рядок",
"deleteRow": "Видалити рядок",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Видалити вибрані рядки",
"importExcel": "Імпортувати з Excel",
"importCSV": "Імпортувати з CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Стовпець успішно продубльовано",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Успішно оновлено UI ACL для таблиць",
"pluginUninstalled": "Плагін успішно видалено",
"pluginSettingsSaved": "Налаштування плагіну успішно збережено",

2
packages/nc-gui/lang/vi.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "Chèn hàng mới",
"deleteRow": "Xóa hàng",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "Xóa các hàng đã chọn",
"importExcel": "Nhập Excel.",
"importCSV": "Import CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "Plugin uninstalled successfully",
"pluginSettingsSaved": "Plugin settings saved successfully",

2
packages/nc-gui/lang/zh-Hans.json

@ -387,6 +387,7 @@
"saveAndStay": "保存并留在此页",
"insertRow": "插入新行",
"deleteRow": "删除行",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "删除所选行",
"importExcel": "导入 Excel",
"importCSV": "导入 CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "此列的副本创建成功",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "已成功更新表的 UI ACL",
"pluginUninstalled": "插件卸载成功",
"pluginSettingsSaved": "插件设置保存成功",

2
packages/nc-gui/lang/zh-Hant.json

@ -387,6 +387,7 @@
"saveAndStay": "Save & Stay",
"insertRow": "插入新行",
"deleteRow": "刪除行",
"duplicateRow": "Duplicate Row",
"deleteSelectedRow": "刪除所選行",
"importExcel": "匯入 Excel",
"importCSV": "匯入 CSV",
@ -716,6 +717,7 @@
},
"success": {
"columnDuplicated": "Column duplicated successfully",
"rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)",
"updatedUIACL": "Updated UI ACL for tables successfully",
"pluginUninstalled": "外掛移除安裝成功",
"pluginSettingsSaved": "外掛設定儲存成功",

33
tests/playwright/pages/Dashboard/ExpandedForm/index.ts

@ -7,6 +7,7 @@ export class ExpandedFormPage extends BasePage {
readonly addNewTableButton: Locator;
readonly copyUrlButton: Locator;
readonly toggleCommentsButton: Locator;
readonly moreOptionsButton: Locator;
constructor(dashboard: DashboardPage) {
super(dashboard.rootPage);
@ -14,12 +15,44 @@ export class ExpandedFormPage extends BasePage {
this.addNewTableButton = this.dashboard.get().locator('.nc-add-new-table');
this.copyUrlButton = this.dashboard.get().locator('.nc-copy-row-url:visible');
this.toggleCommentsButton = this.dashboard.get().locator('.nc-toggle-comments:visible');
this.moreOptionsButton = this.dashboard.get().locator('.nc-actions-menu-btn:visible').last();
}
get() {
return this.dashboard.get().locator(`.nc-drawer-expanded-form`);
}
async clickDuplicateRow() {
await this.moreOptionsButton.click();
// wait for the menu to appear
await this.rootPage.waitForTimeout(1000);
await this.rootPage.locator('.nc-menu-item:has-text("Duplicate Row")').click();
// wait for loader to disappear
// await this.dashboard.waitForLoaderToDisappear();
await this.rootPage.waitForTimeout(2000);
}
async clickDeleteRow() {
await this.moreOptionsButton.click();
// wait for the menu to appear
await this.rootPage.waitForTimeout(1000);
await this.rootPage.locator('.nc-menu-item:has-text("Delete Row")').click();
await this.rootPage.locator('.ant-btn-primary:has-text("OK")').click();
}
async isDisabledDuplicateRow() {
await this.moreOptionsButton.click();
const isDisabled = await this.rootPage.locator('.nc-menu-item.disabled:has-text("Duplicate Row")');
return await isDisabled.count();
}
async isDisabledDeleteRow() {
await this.moreOptionsButton.click();
const isDisabled = await this.rootPage.locator('.nc-menu-item.disabled:has-text("Delete Row")');
return await isDisabled.count();
}
async getShareRowUrl() {
await this.copyUrlButton.click();
await this.verifyToast({ message: 'Copied to clipboard' });

3
tests/playwright/scripts/docker-compose-mysql-playwright.yml

@ -4,10 +4,11 @@ version: "3.5"
# disabling default sql-mode set to only_full_group_by
services:
xc-mysql-sakila-db:
network_mode: host
image: mysql:8.0
command: mysqld --sql_mode=""
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: password
volumes:

48
tests/playwright/tests/expandedFormUrl.spec.ts

@ -1,8 +1,9 @@
import { test } from '@playwright/test';
import { expect, test } from '@playwright/test';
import { DashboardPage } from '../pages/Dashboard';
import { GalleryPage } from '../pages/Dashboard/Gallery';
import { GridPage } from '../pages/Dashboard/Grid';
import setup from '../setup';
import { ToolbarPage } from '../pages/Dashboard/common/Toolbar';
test.describe('Expanded form URL', () => {
let dashboard: DashboardPage;
@ -132,3 +133,48 @@ test.describe('Expanded form URL', () => {
await viewTestTestTable('gallery');
});
});
test.describe('Expanded record duplicate & delete options', () => {
let dashboard: DashboardPage, toolbar: ToolbarPage;
let context: any;
test.beforeEach(async ({ page }) => {
context = await setup({ page });
dashboard = new DashboardPage(page, context.project);
toolbar = dashboard.grid.toolbar;
});
test('Grid', async () => {
await dashboard.closeTab({ title: 'Team & Auth' });
await dashboard.treeView.openTable({ title: 'Actor' });
// create filter to narrow down the number of records
await toolbar.clickFilter();
await toolbar.filter.add({
columnTitle: 'FirstName',
opType: 'is equal',
value: 'NICK',
isLocallySaved: false,
});
await toolbar.clickFilter();
await dashboard.grid.verifyRowCount({ count: 3 });
// expand row & duplicate
await dashboard.grid.openExpandedRow({ index: 0 });
await dashboard.expandedForm.clickDuplicateRow();
await dashboard.expandedForm.save();
await dashboard.grid.verifyRowCount({ count: 4 });
// expand row & delete
await dashboard.grid.openExpandedRow({ index: 3 });
await dashboard.expandedForm.clickDeleteRow();
await dashboard.grid.verifyRowCount({ count: 3 });
// expand row, duplicate & verify menu
await dashboard.grid.openExpandedRow({ index: 0 });
await dashboard.expandedForm.clickDuplicateRow();
expect(await dashboard.expandedForm.isDisabledDeleteRow()).toBe(1);
expect(await dashboard.expandedForm.isDisabledDuplicateRow()).toBe(1);
});
});

Loading…
Cancel
Save