maxgui/tests/unit/utils.js
/**
 * This function finds and returns anchor link (<a> tag) in data-table.
 *
 * @param {Object} payload
 * @param {Object} payload.wrapper a mounted component and methods to test the component
 * @param {String} payload.rowId id of the row
 * @param {Number} payload.cellIndex index of cell that contains a tag
 * @returns {Object} mounted anchor tag element
 */
This function finds and returns anchor link ( tag) in data-table.
This function finds and returns anchor link ( tag ) in data - table .
function findAnchorLinkInTable({ wrapper, rowId, cellIndex }) {
    const dataTable = wrapper.findComponent({ name: 'data-table' })
    const tableCell = dataTable.find(`.cell-${cellIndex}-${rowId}`)
    const aTag = tableCell.find('a')
    return aTag
}
function findAnchorLinkInTable ( { wrapper , rowId , cellIndex } ) { const dataTable = wrapper . findComponent ( { name : 'data-table' } ) const tableCell = dataTable . find ( ` ${ cellIndex } ${ rowId } ` ) const aTag = tableCell . find ( 'a' ) return aTag }
This function finds and returns anchor link (<a> tag) in data-table.
This function finds and returns anchor link ( <a > tag ) in data - table .