async function instrumentAutocomplete(results) {
    await this.driver.executeScript((results) => {
        google.maps.places.AutocompleteService = function() {
            return {
                getPlacePredictions: function(params, callback) {
                    return callback(
                        results,
                        google.maps.places.PlacesServiceStatus.OK,
                    );
                },
            };
        };
    }, results.map((result) => {
        return {
            terms: [{value: result.suburb}, {value: result.state}],
            types: ["locality"],
        };
    }));
}
/**
 * Stub google place suggest so we can get reliable results
 *
 * @param {results} results for autocomplete requests
 *
 * @returns {Promise} promise that resolves when the script executes.
 */
Stub google place suggest so we can get reliable results
@param {results} results for autocomplete requests

@returns {Promise} promise that resolves when the script executes.
Stub google place suggest so we can get reliable results @param { results } results for autocomplete requests @returns { Promise } promise that resolves when the script executes .
async function instrumentAutocomplete(results) {
    await this.driver.executeScript((results) => {
        google.maps.places.AutocompleteService = function() {
            return {
                getPlacePredictions: function(params, callback) {
                    return callback(
                        results,
                        google.maps.places.PlacesServiceStatus.OK,
                    );
                },
            };
        };
    }, results.map((result) => {
        return {
            terms: [{value: result.suburb}, {value: result.state}],
            types: ["locality"],
        };
    }));
}
async function instrumentAutocomplete ( results ) { await this . driver . executeScript ( ( results ) => { google . maps . places . AutocompleteService = function ( ) { return { getPlacePredictions : function ( params , callback ) { return callback ( results , google . maps . places . PlacesServiceStatus . OK , ) ; } , } ; } ; } , results . map ( ( result ) => { return { terms : [ { value : result . suburb } , { value : result . state } ] , types : [ "locality" ] , } ; } ) ) ; }
Stub google place suggest so we can get reliable results
 @param {results} results for autocomplete requests
Stub google place suggest so we can get reliable results @param { results } results for autocomplete requests