Вот грязный хак -
У вас есть свой элемент здесь (добавление отключенного атрибута):
<input type="text" name="test" id="test" disabled="disabled" />
И затем внизу вашей веб-страницы поставьте некоторый JavaScript:
<script>
setTimeout(function(){
document.getElementById('test').removeAttribute("disabled");
},100);
</script>
Надеюсь, что это работает (у) !!!
let ValidationHelperMock = {
ValidationHelper: class{
static checkMandatory(stringValue, parameterName, errorMessage){ };
}
};
let BeneficiaryHelperMock = {
BeneficiaryHelper: class{
static checkBeneficiaryType(beneficiaryType){ };
}
};
describe('unit test for beneficiary add parse', () => {
let utilBase;
let utilGenerateRRNMock;
let utilGenerateSTANMock;
let target = common.proxyquire('../../APIServer/controller/beneficiaryaddv2', {
'nbind': common.nbindStub,
'../../local_modules/logger': common.LoggerMock,
'../validations/common': ValidationHelperMock, //check these paths to exact from the test file
'../../local_modules/dbconnmgr': common.DbConnMgrMock,
'../validations/beneficiary': BeneficiaryHelperMock, //check these paths to exact from the test file
'@noCalThrough': true
});
//...
});