maxgui/src/components/common/DetailsPage/__tests__/DetailsParametersTable.spec.js
/**
 * This function check the key value of module parameter assigned to resource parameter (an object in table row arr)
 * @param {Object} resourceParam parameter that has been processed
 * @param {Object} moduleParam module parameter
 * @param {String} compareKey old unit suffix before updating
 */
This function check the key value of module parameter assigned to resource parameter (an object in table row arr)
@param {Object} resourceParam parameter that has been processed
@param {Object} moduleParam module parameter
@param {String} compareKey old unit suffix before updating
This function check the key value of module parameter assigned to resource parameter ( an object in table row arr ) @param { Object } resourceParam parameter that has been processed @param { Object } moduleParam module parameter @param { String } compareKey old unit suffix before updating
function testParameterInfoAssigned({ wrapper, moduleParamType, moduleParamKeys }) {
    const moduleParam = dummy_module_params.find(param => param.type === moduleParamType)
    let tableRow = wrapper.vm.parametersTableRow
    const resourceParam = tableRow.find(row => row.id === moduleParam.name)
    moduleParamKeys.forEach(key => compareParam(resourceParam, moduleParam, key))
    if (resourceParam.type === 'duration')
        expect(resourceParam.value).to.be.equal(`${resourceParam.originalValue}${moduleParam.unit}`)
}
function testParameterInfoAssigned ( { wrapper , moduleParamType , moduleParamKeys } ) { const moduleParam = dummy_module_params . find ( param => param . type === moduleParamType ) let tableRow = wrapper . vm . parametersTableRow const resourceParam = tableRow . find ( row => row . id === moduleParam . name ) moduleParamKeys . forEach ( key => compareParam ( resourceParam , moduleParam , key ) ) if ( resourceParam . type === 'duration' ) expect ( resourceParam . value ) . to . be . equal ( ` ${ resourceParam . originalValue } ${ moduleParam . unit } ` ) }
This function check the key value of module parameter assigned to resource parameter (an object in table row arr)
 @param {Object} resourceParam parameter that has been processed
 @param {Object} moduleParam module parameter
 @param {String} compareKey old unit suffix before updating
This function check the key value of module parameter assigned to resource parameter ( an object in table row arr ) @param { Object } resourceParam parameter that has been processed @param { Object } moduleParam module parameter @param { String } compareKey old unit suffix before updating
// compare key values // should add unit to value in read mode