Skip to content

Commit

Permalink
Merge pull request #189 from aws-geospatial/bug_ALS-1786_regression-i…
Browse files Browse the repository at this point in the history
…ssues

[Bug] Regression issues
  • Loading branch information
mbalfour-amzn authored Jun 13, 2024
2 parents bde90b9 + fea2bc0 commit 407ac83
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
12 changes: 8 additions & 4 deletions cypress/support/trackerAndGeofenceSupport.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Cypress.Commands.add("addTrackerAndGeofenceEnterExit", (isResponsive, geofenceName) => {
if (isResponsive) {
cy.get('[data-testid="explore-button-container-Geofences"]').click();
cy.get('[data-testid="add-geofence-button-container-mobile"]').click();
cy.get('[data-testid="add-geofence-button-container-mobile"]', { timeout: 30000 }).click();
} else {
cy.get('[class="amplify-flex geofence-button"]').click();
}
cy.get('[placeholder="Enter address or coordinates"]').type("Empire State Building", { delay: 200 });
cy.get('[placeholder="Enter address or coordinates"]', { timeout: 30000 }).type("Empire State Building", {
delay: 200
});
cy.wait(5000);
cy.contains("Empire State Building").click();
cy.get('[placeholder="Type unique Geofence Name"]').type(`${geofenceName}`, { force: true });
Expand Down Expand Up @@ -70,12 +72,14 @@ Cypress.Commands.add("addTrackerAndGeofenceEnterExit", (isResponsive, geofenceNa
Cypress.Commands.add("addEditAndDeleteGeofence", (isResponsive, geofenceName) => {
if (isResponsive) {
cy.get('[data-testid="explore-button-container-Geofences"]').click();
cy.get('[data-testid="add-geofence-button-container-mobile"]').click();
cy.get('[data-testid="add-geofence-button-container-mobile"]', { timeout: 30000 }).click();
} else {
cy.get('[class="amplify-flex geofence-button"]').click();
cy.get('[class="amplify-loader"]').should("not.exist");
}
cy.get('[placeholder="Enter address or coordinates"]').type("Rio Tinto Perth Western Australia", { delay: 200 });
cy.get('[placeholder="Enter address or coordinates"]', { timeout: 30000 }).type("Rio Tinto Perth Western Australia", {
delay: 200
});
cy.wait(4000);
isResponsive ? cy.get('[class="amplify-flex suggestion border-top"]').click() : cy.contains("Rio Tinto").click();
cy.get('[placeholder="Type unique Geofence Name"]').type(`${geofenceName}`);
Expand Down
3 changes: 2 additions & 1 deletion src/atomicui/molecules/MapButtons/MapButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,12 @@ const MapButtons: FC<MapButtonsProps> = ({
// Filter styles based on keyword and selected filters
const filteredGroup = styles.filter(item => {
const { filters, name } = item as MapStyle;

const matchesKeyword =
filters.provider.toLowerCase().includes(lowerCaseKeyword) ||
filters.attribute.some(attr => attr.toLowerCase().includes(lowerCaseKeyword)) ||
filters.type.some(type => type.toLowerCase().includes(lowerCaseKeyword)) ||
name.toLowerCase().includes(lowerCaseKeyword);
t(name).toLowerCase().includes(lowerCaseKeyword);

const matchesFilters =
(selectedFilters.Providers.length === 0 || selectedFilters.Providers.includes(filters.provider)) &&
Expand Down
4 changes: 2 additions & 2 deletions src/atomicui/organisms/SettingsModal/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
data-testid={`${SettingOptionEnum.MAP_STYLE}-details-component`}
gap={0}
direction="column"
overflow="scroll"
overflow="hidden scroll"
>
{mapButtons}
</Flex>
Expand All @@ -418,7 +418,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
gap={0}
direction="column"
padding="0rem 1.15rem"
overflow="scroll"
overflow="hidden scroll"
className="language-switcher-container"
>
{languageSwitcherData.map(({ value, label }, idx) => (
Expand Down

0 comments on commit 407ac83

Please sign in to comment.