From 546a77011045ae4e47a017d662d27b614053a1b2 Mon Sep 17 00:00:00 2001 From: Ahmad Azizi <91204996+its-aazizi@users.noreply.github.com> Date: Fri, 31 May 2024 17:37:46 +0500 Subject: [PATCH 1/4] regression issue fixes --- src/atomicui/molecules/MapButtons/MapButtons.tsx | 3 ++- src/atomicui/organisms/SettingsModal/SettingsModal.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/atomicui/molecules/MapButtons/MapButtons.tsx b/src/atomicui/molecules/MapButtons/MapButtons.tsx index e95ed2c1..f51a221e 100644 --- a/src/atomicui/molecules/MapButtons/MapButtons.tsx +++ b/src/atomicui/molecules/MapButtons/MapButtons.tsx @@ -369,11 +369,12 @@ const MapButtons: FC = ({ // 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)) && diff --git a/src/atomicui/organisms/SettingsModal/SettingsModal.tsx b/src/atomicui/organisms/SettingsModal/SettingsModal.tsx index 929de7cd..b65f2112 100644 --- a/src/atomicui/organisms/SettingsModal/SettingsModal.tsx +++ b/src/atomicui/organisms/SettingsModal/SettingsModal.tsx @@ -401,7 +401,7 @@ const SettingsModal: FC = ({ data-testid={`${SettingOptionEnum.MAP_STYLE}-details-component`} gap={0} direction="column" - overflow="scroll" + overflow="hidden scroll" > {mapButtons} @@ -418,7 +418,7 @@ const SettingsModal: FC = ({ gap={0} direction="column" padding="0rem 1.15rem" - overflow="scroll" + overflow="hidden scroll" className="language-switcher-container" > {languageSwitcherData.map(({ value, label }, idx) => ( From 0ed94eb2da57a4c44063d9d9f2a1a60b3e29eb07 Mon Sep 17 00:00:00 2001 From: Ahmad Azizi <91204996+its-aazizi@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:23:45 +0500 Subject: [PATCH 2/4] fixes for failure of tests --- cypress/support/trackerAndGeofenceSupport.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cypress/support/trackerAndGeofenceSupport.js b/cypress/support/trackerAndGeofenceSupport.js index d08b51a1..77cbbef1 100644 --- a/cypress/support/trackerAndGeofenceSupport.js +++ b/cypress/support/trackerAndGeofenceSupport.js @@ -5,6 +5,7 @@ Cypress.Commands.add("addTrackerAndGeofenceEnterExit", (isResponsive, geofenceNa } else { cy.get('[class="amplify-flex geofence-button"]').click(); } + cy.wait(5000); cy.get('[placeholder="Enter address or coordinates"]').type("Empire State Building", { delay: 200 }); cy.wait(5000); cy.contains("Empire State Building").click(); @@ -75,6 +76,7 @@ Cypress.Commands.add("addEditAndDeleteGeofence", (isResponsive, geofenceName) => cy.get('[class="amplify-flex geofence-button"]').click(); cy.get('[class="amplify-loader"]').should("not.exist"); } + cy.wait(4000); cy.get('[placeholder="Enter address or coordinates"]').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(); From a0b60978770133a2a43d45c29735a1a5a0e5a2ad Mon Sep 17 00:00:00 2001 From: Ahmad Azizi <91204996+its-aazizi@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:12:24 +0500 Subject: [PATCH 3/4] increased retries for E2E tests --- cypress.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index 4a9065ec..ede02c9f 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ defaultCommandTimeout: 20000, viewportWidth: 1024, viewportHeight: 733, - retries: 2, + retries: 3, video: false, env: { browserPermissions: { From ea5e1b90671c44c53d436d26c4ebd5f729d6c21e Mon Sep 17 00:00:00 2001 From: Ahmad Azizi <91204996+its-aazizi@users.noreply.github.com> Date: Thu, 13 Jun 2024 20:02:52 +0500 Subject: [PATCH 4/4] added timeout for specific cases --- cypress.config.ts | 2 +- cypress/support/trackerAndGeofenceSupport.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index ede02c9f..4a9065ec 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ defaultCommandTimeout: 20000, viewportWidth: 1024, viewportHeight: 733, - retries: 3, + retries: 2, video: false, env: { browserPermissions: { diff --git a/cypress/support/trackerAndGeofenceSupport.js b/cypress/support/trackerAndGeofenceSupport.js index 77cbbef1..4b7eee58 100644 --- a/cypress/support/trackerAndGeofenceSupport.js +++ b/cypress/support/trackerAndGeofenceSupport.js @@ -1,12 +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.wait(5000); - 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 }); @@ -71,13 +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.wait(4000); - 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}`);