diff --git a/src/fireedge/src/client/components/Tables/VmTemplates/actions.js b/src/fireedge/src/client/components/Tables/VmTemplates/actions.js
index 112328c328..410cc66915 100644
--- a/src/fireedge/src/client/components/Tables/VmTemplates/actions.js
+++ b/src/fireedge/src/client/components/Tables/VmTemplates/actions.js
@@ -172,6 +172,7 @@ const Actions = () => {
.filter(Boolean)
.join(' - ')
},
+ dataCy: 'modal-clone',
},
form: (rows) => {
const names = rows?.map(({ original }) => original?.NAME)
@@ -199,6 +200,7 @@ const Actions = () => {
icon: Group,
selected: true,
color: 'secondary',
+ dataCy: 'template-ownership',
options: [
{
accessor: VM_TEMPLATE_ACTIONS.CHANGE_OWNER,
@@ -243,6 +245,7 @@ const Actions = () => {
isConfirmDialog: true,
dialogProps: {
title: T.Share,
+ dataCy: `modal-${VM_TEMPLATE_ACTIONS.SHARE}`,
children: (rows) =>
MessageToConfirmAction(rows, T.ShareVmTemplateDescription),
},
@@ -258,6 +261,7 @@ const Actions = () => {
isConfirmDialog: true,
dialogProps: {
title: T.Unshare,
+ dataCy: `modal-${VM_TEMPLATE_ACTIONS.UNSHARE}`,
children: (rows) =>
MessageToConfirmAction(
rows,
@@ -277,6 +281,7 @@ const Actions = () => {
icon: Lock,
selected: true,
color: 'secondary',
+ dataCy: 'template-lock',
options: [
{
accessor: VM_TEMPLATE_ACTIONS.LOCK,
@@ -284,6 +289,7 @@ const Actions = () => {
isConfirmDialog: true,
dialogProps: {
title: T.Lock,
+ dataCy: `modal-${VM_TEMPLATE_ACTIONS.LOCK}`,
children: MessageToConfirmAction,
},
onSubmit: (rows) => async () => {
@@ -297,6 +303,7 @@ const Actions = () => {
isConfirmDialog: true,
dialogProps: {
title: T.Unlock,
+ dataCy: `modal-${VM_TEMPLATE_ACTIONS.UNLOCK}`,
children: MessageToConfirmAction,
},
onSubmit: (rows) => async () => {
@@ -315,6 +322,7 @@ const Actions = () => {
options: [
{
dialogProps: {
+ dataCy: `modal-${VM_TEMPLATE_ACTIONS.DELETE}`,
title: (rows) => {
const isMultiple = rows?.length > 1
const { ID, NAME } = rows?.[0]?.original ?? {}
diff --git a/src/fireedge/src/client/containers/VmTemplates/index.js b/src/fireedge/src/client/containers/VmTemplates/index.js
index a30d8c3435..db32a3ab7b 100644
--- a/src/fireedge/src/client/containers/VmTemplates/index.js
+++ b/src/fireedge/src/client/containers/VmTemplates/index.js
@@ -108,7 +108,7 @@ const InfoTabs = memo(({ template, gotoPage, unselect }) => {
/>
)}
- {`#${template?.ID} | ${template?.NAME}`}
+ {`#${template?.ID || ''} | ${template?.NAME || ''}`}
diff --git a/src/fireedge/src/client/utils/helpers.js b/src/fireedge/src/client/utils/helpers.js
index f5c02594d9..ddec55ace0 100644
--- a/src/fireedge/src/client/utils/helpers.js
+++ b/src/fireedge/src/client/utils/helpers.js
@@ -445,8 +445,9 @@ export const intersperse = (arr, sep) => {
* @param {string[]|object} knownAttributes - Attributes to check
* @returns {object} Returns object with unknown properties
*/
-export const getUnknownAttributes = (obj, knownAttributes) => {
+export const getUnknownAttributes = (obj = {}, knownAttributes) => {
const unknown = {}
+
const entries = Object.entries(obj)
const attributes = Array.isArray(knownAttributes)