Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade maplibre-gl-js-amplify to v2.1.0 to support getSuggestions and getPlace #2871

Merged
merged 10 commits into from
Nov 1, 2022
5 changes: 5 additions & 0 deletions .changeset/cyan-eggs-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aws-amplify/ui-react": patch
---

chore: upgrade maplibre-gl-js-amplify to v2.1.0 to support getSuggestions and getPlace
2 changes: 1 addition & 1 deletion packages/e2e/cypress/integration/common/geo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ When('I clear the search results', () => {
cy.findByRole('textbox', {
name: /search/i,
}).trigger('mouseenter');
cy.findByRole('button', { name: 'Clear' }).click();
cy.findByRole('button', { name: 'Clear' }).click({ force: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? Can we add a comment if this is not immediately resolvable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Clear' button somehow couldn’t be found by cypress when its display property is being toggled, so added {force: true} for the click. I see it is already being used in other places so thought maybe it is an existing Cypress issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood -- ideally, we should avoid force: true if possible, or explain in comment why this is necessary. For example:

// We have to force this click because the radio input type isn't visible by default
// and instead has ::before decoration.
//
// cy.click() failed because this element:
// <input ...> is being covered by another element:
// <form ...>...</form>
force: true,

Not blocking, but I think it's worth looking at for test maintainability purposes.

});

When('I click on a map marker', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Feature: Map with LocationSearch
@react
Scenario: Clear search results
When I search for "Amazon Go"
And I select the first search result
And I clear the search results
Then I see no map markers
And I see no search results
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"lodash": "4.17.21",
"mapbox-gl": "1.13.1",
"maplibre-gl": "2.1.9",
"maplibre-gl-js-amplify": "2.0.4",
"maplibre-gl-js-amplify": "2.1.0",
"qrcode": "1.5.0",
"react-generate-context": "1.0.1",
"react-map-gl": "7.0.15",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.