maxgui/src/components/common/DetailsPage/__tests__/RelationshipTable.spec.js
/**
 * This function mockups opening confirmation dialog when clicking
 * delete icon in data-table.
 * @param {Object} wrapper A Wrapper is an object that contains a mounted component and methods to test the component
 * @param {String|Number} id id of item to be deleted
 */
This function mockups opening confirmation dialog when clicking
delete icon in data-table.
@param {Object} wrapper A Wrapper is an object that contains a mounted component and methods to test the component
@param {String|Number} id id of item to be deleted
This function mockups opening confirmation dialog when clicking delete icon in data - table . @param { Object } wrapper A Wrapper is an object that contains a mounted component and methods to test the component @param { String|Number } id id of item to be deleted
async function mockupOpenConfirmDeletingDialog(wrapper, id) {
    const dataTable = wrapper.findComponent({ name: 'data-table' })
    const tbody = dataTable.find(`tbody`)
    const { wrappers: tableRowEls } = tbody.findAll('tr')
    let index = tableRowEls.findIndex(tr => tr.html().includes(id))
    await tableRowEls[index].trigger('mouseenter')
    let deleteBtn = tableRowEls[index].find('button')
    await deleteBtn.trigger('click')
}
async function mockupOpenConfirmDeletingDialog ( wrapper , id ) { const dataTable = wrapper . findComponent ( { name : 'data-table' } ) const tbody = dataTable . find ( ` ` ) const { wrappers : tableRowEls } = tbody . findAll ( 'tr' ) let index = tableRowEls . findIndex ( tr => tr . html ( ) . includes ( id ) ) await tableRowEls [ index ] . trigger ( 'mouseenter' ) let deleteBtn = tableRowEls [ index ] . find ( 'button' ) await deleteBtn . trigger ( 'click' ) }
This function mockups opening confirmation dialog when clicking
 delete icon in data-table.
This function mockups opening confirmation dialog when clicking delete icon in data - table .