odoo-13.0/addons/web/static/tests/helpers/test_utils_fields.js
/**
 * Click to open the dropdown on a many2one
 *
 * @param {string} fieldName
 * @param {[string]} selector if set, this will restrict the search for the m2o
 *    input
 * @returns {HTMLInputElement} the main many2one input
 */
Click to open the dropdown on a many2one
@param {string} fieldName
@param {[string]} selector if set, this will restrict the search for the m2o
input
@returns {HTMLInputElement} the main many2one input
Click to open the dropdown on a many2one @param { string } fieldName @param { [ string ] } selector if set this will restrict the search for the m2o input @returns { HTMLInputElement } the main many2one input
async function clickOpenM2ODropdown(fieldName, selector) {
    var m2oSelector = `${selector || ''} .o_field_many2one[name=${fieldName}] input`;
    var matches = document.querySelectorAll(m2oSelector);
    if (matches.length !== 1) {
        throw new Error(`cannot open m2o: selector ${selector} has been found ${matches.length} instead of 1`);
    }
    matches[0].click();
    return await concurrency.delay(0).then(function () {
        return matches[0];
    });
}
async function clickOpenM2ODropdown ( fieldName , selector ) { var m2oSelector = ` ${ selector || '' } ${ fieldName } ` ; var matches = document . querySelectorAll ( m2oSelector ) ; if ( matches . length !== 1 ) { throw new Error ( ` ${ selector } ${ matches . length } ` ) ; } matches [ 0 ] . click ( ) ; return await concurrency . delay ( 0 ) . then ( function ( ) { return matches [ 0 ] ; } ) ; }
Click to open the dropdown on a many2one
 @param {string} fieldName
 @param {[string]} selector if set, this will restrict the search for the m2o
    input
 @returns {HTMLInputElement} the main many2one input
Click to open the dropdown on a many2one @param { string } fieldName @param { [ string ] } selector if set this will restrict the search for the m2o input @returns { HTMLInputElement } the main many2one input