mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-29 16:01:41 -07:00
[Draft] Adds Nominatum search behind a feature flag (#935)
* Add intial search component * Add nominatum simple * Connect search field to Nominatum API - remove react-query - remove react-query logic from J40Map - move searchHandler to MapSearch * Adjust zoom and territory focus - adjust zoom buttons in CSS to allow for search field * Place search behind a feature flag * Add cors to fetch and error handling - this is to test on OMB machines * Add error messaging and bound search results to US - adjust controls to add error message to search - add MapSearchMessage component for error message - add unit tests - add state to track if API results are empty - add intl on two strings, placeholder and error message * Remove warpper around MapSearch component - reorder component import in J40Map - remove unused CSS in MapSearch.module.scss - remove and comment on wrapper error on MapSearch - rename isSearchEmpty to isSearchResultsEmpty - update snapshot * Add error message - if the search query returns null, show an error message
This commit is contained in:
parent
84874ee4a5
commit
8e31ca032c
18 changed files with 294 additions and 7 deletions
|
@ -0,0 +1,43 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`rendering of the MapSearch checks if component renders 1`] = `
|
||||
<DocumentFragment>
|
||||
<div>
|
||||
<div>
|
||||
No location found. Please try another location.
|
||||
</div>
|
||||
<form
|
||||
class="usa-search usa-search--small"
|
||||
data-testid="form"
|
||||
role="search"
|
||||
>
|
||||
<label
|
||||
class="usa-sr-only"
|
||||
data-testid="label"
|
||||
for="search-field"
|
||||
>
|
||||
Search
|
||||
</label>
|
||||
<input
|
||||
class="usa-input"
|
||||
data-testid="textInput"
|
||||
id="search-field"
|
||||
name="search"
|
||||
placeholder="Enter a city, state or ZIP"
|
||||
type="search"
|
||||
/>
|
||||
<button
|
||||
class="usa-button"
|
||||
data-testid="button"
|
||||
type="submit"
|
||||
>
|
||||
<span
|
||||
class="usa-sr-only"
|
||||
>
|
||||
Search
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</DocumentFragment>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue