(form, parameterName, value)
| 12 | import {attachToDocument, createScriptServerTestVue, setChipListValue, vueTicks} from '../test_utils'; |
| 13 | |
| 14 | export async function setValueByUser(form, parameterName, value) { |
| 15 | const childComponent = findField(form, parameterName); |
| 16 | |
| 17 | if (childComponent.$options._componentTag === ChipsList.name) { |
| 18 | setChipListValue(childComponent, value); |
| 19 | return; |
| 20 | } |
| 21 | |
| 22 | const inputField = findFieldInputElement(form, parameterName); |
| 23 | |
| 24 | setInputValue(inputField, value, true); |
| 25 | |
| 26 | await vueTicks(); |
| 27 | } |
| 28 | |
| 29 | export const findField = (form, expectedName, failOnMissing = true) => { |
| 30 | for (const child of form.$children) { |
no test coverage detected