masakudamatsu / mima

My Ideal Map, a web app to allow users to save places with **external links** on Google Maps
https://www.my-ideal-map.app
MIT License
1 stars 0 forks source link

Test ARIA 1.2 guideline implementation for search box #204

Open masakudamatsu opened 2 years ago

masakudamatsu commented 2 years ago

We need to mock the async implementation of getPlacePredictions() of Google Maps AutocompleteService API, so that Jest will update the DOM to include the <li> elements of autocomplete suggestions, whose ARIA-attributes we need to make assertions on.

To figure out how to mock it, see

Start with SearchBox.test.js in the stash called mock Autocomplete Services.

masakudamatsu commented 2 years ago

importing window.google in both implementation and test code may work...