Skip to content

Commit

Permalink
Added support for latest SDKs (#272)
Browse files Browse the repository at this point in the history
* updated demo app - maps, places and routes

* updated package-lock.json

* removed unecessary pngs

* added new navigation and updated tests accordingly

* updated icons and added desc

* updated README

* updated link opening and test

* updates

* resolved comment

* updated template for unauth geofences

* added check on color scheme for hybrid and satellite map styles

* resolved bugs

* fixed e2e tests

* resolved ts issue

* fixed and updated e2e tests

* resolved bugs

* updated CF templates

* updates

* updated template

* updated template

* updated workflow files, README and removed ap-southeast-1 region

* fixed e2e and unit test issues

* resolved comments

* resolved comments

* resolved comments

* updated e2e

* added wait for network calls

* resolved test issues

* udpated tests

* updated test

* removed log

* added retries

* optimized route layer data

* resolved suggest API issue

* resolved search issue

* implemented ALS-1835 and ALS-1836, updated geo-places and geo-routes clients

* resolved issues and updated deps

* updated sidebar and responsive navigation

* resolved comment

* resolved comment

* updated place popup with opening hours, websites and phone numbers

* resolved opening hours display issue

---------

Co-authored-by: Ahmad Azizi <[email protected]>
Co-authored-by: Mike Balfour <[email protected]>
Co-authored-by: wadhawh <[email protected]>
  • Loading branch information
4 people authored Nov 6, 2024
1 parent b1bf7a4 commit 3eab7c3
Show file tree
Hide file tree
Showing 154 changed files with 10,709 additions and 15,157 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VITE_AWS_API_KEY_REGIONS=XX-XXXX-X,XX-XXXX-X
VITE_AWS_API_KEYS=v1.public.XXXXXXXXXXXXXXX
VITE_AWS_COGNITO_IDENTITY_POOL_IDS=XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab,XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab
VITE_AWS_WEB_SOCKET_URLS=XXXXXXXXXXXXXX-ats.iot.XX-XXXX-X.amazonaws.com,XXXXXXXXXXXXXX-ats.iot.XX-XXXX-X.amazonaws.com
VITE_PINPOINT_IDENTITY_POOL_ID=XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: E2E tests

on:
push:
branches:
- main
pull_request:
branches: [main]

Expand All @@ -18,26 +15,27 @@ jobs:

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.17.0

- name: Create .env file
run: |
echo "VITE_AWS_COGNITO_IDENTITY_POOL_IDS=${{ secrets.VITE_AWS_COGNITO_IDENTITY_POOL_IDS }}" > .env
echo "VITE_AWS_API_KEY_REGIONS=${{ secrets.VITE_AWS_API_KEY_REGIONS }}" >> .env
echo "VITE_AWS_API_KEYS=${{ secrets.VITE_AWS_API_KEYS }}" >> .env
echo "VITE_AWS_COGNITO_IDENTITY_POOL_IDS=${{ secrets.VITE_AWS_COGNITO_IDENTITY_POOL_IDS }}" >> .env
echo "VITE_AWS_WEB_SOCKET_URLS=${{ secrets.VITE_AWS_WEB_SOCKET_URLS }}" >> .env
echo "VITE_PINPOINT_IDENTITY_POOL_ID=${{ secrets.VITE_PINPOINT_IDENTITY_POOL_ID }}" >> .env
echo "VITE_PINPOINT_APPLICATION_ID=${{ secrets.VITE_PINPOINT_APPLICATION_ID }}" >> .env
echo "VITE_AWS_CF_TEMPLATE=${{ secrets.VITE_AWS_CF_TEMPLATE }}" >> .env
echo "VITE_APPLE_APP_STORE_LINK=${{ secrets.VITE_APPLE_APP_STORE_LINK }}" >> .env
echo "VITE_GOOGLE_PLAY_STORE_LINK=${{ secrets.VITE_GOOGLE_PLAY_STORE_LINK }}" >> .env
echo "VITE_DATA_FILES_URL=${{ secrets.VITE_DATA_FILES_URL }}" >> .env
echo "VITE_SAMPLES_LIST_FILENAME=${{ secrets.VITE_SAMPLES_LIST_FILENAME }}" >> .env
echo "VITE_APP_VERSION=${{ secrets.VITE_APP_VERSION }}" >> .env
echo "VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE=${{ secrets.VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE }}" >> .env
echo "VITE_MIGRATE_A_WEB_APP_PAGE=${{ secrets.VITE_MIGRATE_A_WEB_APP_PAGE }}" >> .env
echo "VITE_MIGRATE_AN_ANDROID_APP_PAGE=${{ secrets.VITE_MIGRATE_AN_ANDROID_APP_PAGE }}" >> .env
echo "VITE_MIGRATE_AN_IOS_APP_PAGE=${{ secrets.VITE_MIGRATE_AN_IOS_APP_PAGE }}" >> .env
echo "VITE_MIGRATE_A_WEB_SERVICE_PAGE=${{ secrets.VITE_MIGRATE_A_WEB_SERVICE_PAGE }}" >> .env
echo "VITE_PRICING_PAGE=${{ secrets.VITE_PRICING_PAGE }}" >> .env
echo "VITE_CUSTOM_ASSETS_URL=${{ secrets.VITE_CUSTOM_ASSETS_URL }}" >> .env
echo "VITE_SHOW_NEW_NAVIGATION=${{ secrets.VITE_SHOW_NEW_NAVIGATION }}" >> .env
- name: Install dependencies
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/security-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Security tests

on:
push:
branches:
- main
pull_request:
branches: [main]

Expand All @@ -18,6 +15,8 @@ jobs:

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.17.0

- name: Install dependencies
run: cd security-tests/ && npm install
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Unit tests

on:
push:
branches:
- main
pull_request:
branches: [main]

Expand All @@ -18,6 +15,8 @@ jobs:

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.17.0

- name: Install dependencies
run: npm install
Expand Down
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,34 @@

## Requirements

1. Run the template from `/extra/cloudformation/default-unauth-resources-template.yaml` to create a cloudformation stack on AWS in `us-east-1` region using your own AWS account and get `IdentityPoolId`, `PinPointAppId`, `WebSocketUrl` from stack output's tab.
1. Run the template from `/extra/cloudformation/unauth-resources.yaml` to create AWS CloudFormation stack in `us-east-1` region and get `Region`, `ApiKey`, `IdentityPoolId`, `PinPointAppId`, `WebSocketUrl` from stack output's tab.
- `Region` value will be added to `.env` file against `VITE_AWS_API_KEY_REGIONS`.
- `ApiKey` value will be added to `.env` file against `VITE_AWS_API_KEYS`.
- In stack output's tab only the ApiKey name is visible, in order to get the ApiKey value
- Navigate to Amazon Location Service
- Click on "API keys" from the left navigation pane
- Click on the ApiKey name
- Copy the ApiKey value
- `IdentityPoolId` value will be added to `.env` file against `VITE_AWS_COGNITO_IDENTITY_POOL_IDS` and `VITE_PINPOINT_IDENTITY_POOL_ID`.
- `PinPointAppId` value will be added to `.env` file against `VITE_PINPOINT_APPLICATION_ID`.
- `WebSocketUrl` value will be added to `.env` file against `VITE_AWS_WEB_SOCKET_URLS`.
2. Run the template from `/extra/cloudformation/default-unauth-resources-template.yaml` to create a cloudformation stack on AWS in `ap-southeast-1` region using your own AWS account and get `IdentityPoolId`, `WebSocketUrl` from stack output's tab **[Necessary if you want *GrabMaps* to be enabled]**.
- `IdentityPoolId` value will be added to `.env` file against `VITE_AWS_COGNITO_IDENTITY_POOL_IDS` **(comma separated for multiple values)**.
- `WebSocketUrl` value will be added to `.env` file against `VITE_AWS_WEB_SOCKET_URLS` **(comma separated for multiple values)**.
3. Value for `VITE_AWS_CF_TEMPLATE`, `VITE_APPLE_APP_STORE_LINK`, `VITE_GOOGLE_PLAY_STORE_LINK` can be added as it is to `.env` file from `.env.examples`.
- ---
***Note***
* Pinpoint and Translate resosurces are only created in `us-east-1` which are required for the analytics feature and running translation scripts.
* Make sure to run the above stack in `eu-west-1` as well to support multiple regions.
* The `Region`, `ApiKey`, `IdentityPoolId`, `WebSocketUrl` values from stack output's tab can be added to `.env` file against the respective keys.
* The `VITE_AWS_API_KEY_REGIONS`, `VITE_AWS_API_KEYS`, `VITE_AWS_COGNITO_IDENTITY_POOL_IDS`, `VITE_AWS_WEB_SOCKET_URLS` keys in `.env` file should be comma separated for multiple values and must be in same order for all variables.
---
2. Upload the CF template from `/extra/cloudformation/auth-resources.yaml` to S3 bucket and add the link with the following prefix `https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create?stackName=amazon-location-resources-setup&templateURL=<LINK_TO_UPLOADED_CF_TEMPLATE>` to the key `VITE_AWS_CF_TEMPLATE` in `.env` file.
3. Value for `VITE_APPLE_APP_STORE_LINK`, `VITE_GOOGLE_PLAY_STORE_LINK` can be added as it is to `.env` file from `.env.examples`.
4. Value for `VITE_APP_VERSION` needs to be populated with the correct version at the time of deployment in the following format `2.1.0`.
5. Values for `VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE`, `VITE_MIGRATE_A_WEB_APP_PAGE`, `VITE_MIGRATE_AN_ANDROID_APP_PAGE`, `VITE_MIGRATE_AN_IOS_APP_PAGE`, `VITE_MIGRATE_A_WEB_SERVICE_PAGE` and `VITE_PRICING_PAGE` can either be `1` or `0` to either enable or disable the respective pages.
6. Values for `VITE_SHOW_NEW_NAVIGATION` can either be `1` or `0` to either enable or disable the new navigation, turning it off would show the current navigation instead.

#### Env keys required in `.env` file, see `.env.example` for reference

> VITE_AWS_API_KEY_REGIONS<br />
> VITE_AWS_API_KEYS<br />
> VITE_AWS_COGNITO_IDENTITY_POOL_IDS<br />
> VITE_AWS_WEB_SOCKET_URLS<br />
> VITE_PINPOINT_IDENTITY_POOL_ID<br />
Expand Down Expand Up @@ -57,8 +71,6 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
#### Env keys required in `cypress.env.json` file, see `cypress.env.json.example` for reference.

> WEB_DOMAIN<br />
> WEB_DOMAIN_USERNAME<br />
> WEB_DOMAIN_PASSWORD<br />
> IDENTITY_POOL_ID<br />
> USER_DOMAIN<br />
> USER_POOL_CLIENT_ID<br />
Expand All @@ -71,8 +83,8 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
#### If you are configuring Github actions for the E2E tests, make sure to add the below env keys to the secrets section of the repo.

1. The `/extra/cloudformation/main-cf-template.yaml` needs to be deployed on one of the production accounts in the `us-east-1` region.
2. Download this `/extra/cloudformation/main-cf-template.yaml` on local machine.
1. The `/extra/cloudformation/auth-resources.yaml` needs to be deployed on one of the production accounts in the `us-east-1` region.
2. Download this `/extra/cloudformation/auth-resources.yaml` on local machine.
3. Login to AWS console.
4. Go to CloudFormation service.
5. Click on Create Stack → Upload a Template file → Select the template file downloaded above.
Expand All @@ -84,32 +96,29 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11. Add all keys from `.env` file to the secrets section of the repo as well from the above Requirements section.
```
> WEB_DOMAIN: "http://localhost:3000"
> WEB_DOMAIN_USERNAME: "XXXXX" // This is the username for the web domain (only required for dev and qa environments, not needed for prod environment)
> WEB_DOMAIN_PASSWORD: "XXXXX" // This is the password for the web domain (only required for dev and qa environments, not needed for prod environment)
> IDENTITY_POOL_ID: "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab" // Stack output as IdentityPoolId
> USER_DOMAIN: "https://XXXXXXXXXXXX.XXXX.XX-XXXX-X.amazoncognito.com/" // Stack output as UserDomain
> USER_POOL_CLIENT_ID: "XXXXXXXXXXXX" // Stack output as UserPoolClientId
> USER_POOL_ID: "XX-XXXX-X_XXXXXXXXXX" // Stack output as UserPoolId
> WEB_SOCKET_URL: "XXXXXXXXXXX-ats.iot.us-east-1.amazonaws.com" // Stack output as WebSocketUrl
> COGNITO_EMAIL: "[email protected]" // Stack output as UserEmail
> COGNITO_PASSWORD: "XXXXXX" // This is the password for the cognito user (received on registered email)
> VITE_AWS_API_KEY_REGIONS
> VITE_AWS_API_KEYS
> VITE_AWS_COGNITO_IDENTITY_POOL_IDS
> VITE_AWS_WEB_SOCKET_URLS
> VITE_PINPOINT_IDENTITY_POOL_ID
> VITE_PINPOINT_APPLICATION_ID
> VITE_AWS_CF_TEMPLATE
> VITE_APPLE_APP_STORE_LINK
> VITE_GOOGLE_PLAY_STORE_LINK
> VITE_DATA_FILES_URL
> VITE_SAMPLES_LIST_FILENAME
> VITE_APP_VERSION
> VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE
> VITE_MIGRATE_A_WEB_APP_PAGE
> VITE_MIGRATE_AN_ANDROID_APP_PAGE
> VITE_MIGRATE_AN_IOS_APP_PAGE
> VITE_MIGRATE_A_WEB_SERVICE_PAGE
> VITE_PRICING_PAGE
> VITE_CUSTOM_ASSETS_URL
> VITE_SHOW_NEW_NAVIGATION
```

Expand All @@ -122,8 +131,8 @@ Runs Cypress tests to completion in a headed chrome browser.
#### Env keys required in `security-tests/.env` file, see `security-tests/.env.example` for reference.

> IDENTITY_POOL_ID</br>
> USER_POOL_ID</br>
> USER_POOL_CLIENT_ID</br>
> USER_POOL_ID</br>
> COGNITO_EMAIL</br>
> COGNITO_PASSWORD</br>
> IAM_AUTH_ROLE_NAME</br>
Expand Down
2 changes: 0 additions & 2 deletions cypress.env.json.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"WEB_DOMAIN": "http://localhost:3000",
"WEB_DOMAIN_USERNAME": "XXXXXX",
"WEB_DOMAIN_PASSWORD": "XXXXXXXXXX",
"IDENTITY_POOL_ID": "XX-XXXX-X:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"USER_DOMAIN": "https://XXXXXXXXXXXX.XXXX.XX-XXXX-X.amazoncognito.com/",
"USER_POOL_CLIENT_ID": "XXXXXXXXXXXX",
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/userIsAbleToConnectAndDisconnectAwsAccount.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ describe("Connecting and Disconnecting AWS account", () => {
context("Desktop view", () => {
beforeEach(() => {
cy.visitDomain(`${Cypress.env("WEB_DOMAIN")}/demo`);
cy.connectAwsAccount(Viewport.DESKTOP);
});

it("CDAA-001 - should allow user to connect, sign-in, sign-out and disconnect AWS account from sidebar", () => {
cy.connectAwsAccount(Viewport.DESKTOP);
cy.signOutAndDisconnectFromAwsAccount(Viewport.DESKTOP);
});
});

context("Responsive view", () => {
beforeEach(() => {
cy.visitDomainInResponsiveView(`${Cypress.env("WEB_DOMAIN")}/demo`);
cy.connectAwsAccount(Viewport.RESPONSIVE);
});

it("CDAA-002 - should allow user to connect, sign-in, sign-out and disconnect AWS account from sidebar", () => {
cy.connectAwsAccount(Viewport.RESPONSIVE);
cy.signOutAndDisconnectFromAwsAccount(Viewport.RESPONSIVE);
});
});
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/userIsAbleToSearch.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("Search", () => {

it("DS-005 - should show user an error message when no search text is present", { scrollBehavior: false }, () => {
cy.get('[inputmode="search"]').type("{enter}");
cy.get("div").should("contain", "Failed to search place by text, 'Text' must have length at least 1");
cy.get("div").should("contain", "Failed to search place by text, 'QueryText' must have length at least 1");
});

it.skip("should enable nl search and allow user to view POI after nl search", { scrollBehavior: false }, () => {
Expand Down Expand Up @@ -81,14 +81,14 @@ describe("Search", () => {
{ scrollBehavior: false },
() => {
cy.get('[data-testid="search-box-input"]').type("gramercy park music school USA");
cy.get('[data-testid="search-suggestions"]').click();
cy.get('[data-testid="search-suggestions"]').first().click();
cy.get('[data-testid="poi-body"]').should("be.visible");
}
);

it("DS-008 - should allow user to search by geocode", { scrollBehavior: false }, () => {
cy.get('[data-testid="search-box-input"]').type("-31.9627092,115.9248736");
cy.get('[data-testid="search-suggestions"]').click();
cy.get('[data-testid="search-suggestions"]').first().click();
cy.get('[data-testid="poi-body"]').should("be.visible");
});

Expand All @@ -108,7 +108,7 @@ describe("Search", () => {

it("DS-010 - should show user an error message when no search text is present", { scrollBehavior: false }, () => {
cy.get('[data-testid="search-box-input"]').type("{enter}");
cy.get("div").should("contain", "Failed to search place by text, 'Text' must have length at least 1");
cy.get("div").should("contain", "Failed to search place by text, 'QueryText' must have length at least 1");
});
});
});
18 changes: 5 additions & 13 deletions cypress/e2e/userIsAbleToUseSettings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ describe("Settings", () => {
cy.toggleDefaultUnitsForMap(Viewport.DESKTOP);
});

it("ST-002 - should allow user to select map data provider", { scrollBehavior: false }, () => {
cy.selectMapDataProvider();
});

it("ST-003 - should allow user to select map style", { scrollBehavior: false }, () => {
it("ST-002 - should allow user to select map style", { scrollBehavior: false }, () => {
cy.selectMapStyle(Viewport.DESKTOP);
});

it("ST-004 - should allow user to set default route options from settings", { scrollBehavior: false }, () => {
it("ST-003 - should allow user to set default route options from settings", { scrollBehavior: false }, () => {
cy.checkDefaultRouteOptions();
});
});
Expand All @@ -32,22 +28,18 @@ describe("Settings", () => {
beforeEach(() => {
cy.visitDomainInResponsiveView(`${Cypress.env("WEB_DOMAIN")}/demo`);
cy.openResponsiveMenu('[data-testid="bottomsheet"]');
cy.contains("Settings").click();
cy.contains("Settings").click({ force: true });
});

it("ST-005 - should allow user toggle default units for map", { scrollBehavior: false }, () => {
cy.toggleDefaultUnitsForMap(Viewport.RESPONSIVE);
});

it("ST-006 - should allow user to select map data provider", { scrollBehavior: false }, () => {
cy.selectMapDataProvider();
});

it("ST-007 - should allow user to select map style", { scrollBehavior: false }, () => {
it("ST-006 - should allow user to select map style", { scrollBehavior: false }, () => {
cy.selectMapStyle(Viewport.RESPONSIVE);
});

it("ST-008 - should allow user to set default route options from settings", { scrollBehavior: false }, () => {
it("ST-007 - should allow user to set default route options from settings", { scrollBehavior: false }, () => {
cy.checkDefaultRouteOptions();
});
});
Expand Down
6 changes: 2 additions & 4 deletions cypress/e2e/userIsAbleToUseTheSidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ describe("Sidebar", () => {
.and("contain", "Migration")
.and("contain", "Overview")
.and("contain", "Products")
.and("contain", "Industries")
.and("contain", "Getting Started")
.and("contain", "Pricing")
.and("contain", "FAQs")
.and("contain", "Industry")
.and("contain", "Resources");
});
});
Expand All @@ -38,10 +37,9 @@ describe("Sidebar", () => {
.and("contain", "Provide Feedback")
.and("contain", "Overview")
.and("contain", "Products")
.and("contain", "Industries")
.and("contain", "Getting Started")
.and("contain", "Pricing")
.and("contain", "FAQs")
.and("contain", "Industry")
.and("contain", "Resources");
}
);
Expand Down
35 changes: 10 additions & 25 deletions cypress/support/MapDataAndStylesShortcutSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,17 @@ Cypress.Commands.add("switchBetweenMapStyles", isResponsive => {
cy.get('[data-testid="map-styles-card"]').should("be.visible");
}

cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.Esri.Light"]').should(
"have.class",
"mb-style-container selected"
);
cy.get('[data-testid="map-style-item-Standard"]').should("have.class", "mb-style-container selected");

cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.HERE.Explore"]').click({ force: true });
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.HERE.Explore"]').click({ force: true });
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.HERE.Explore"]').should(
"have.class",
"mb-style-container selected"
);
cy.get('[data-testid="map-style-item-Monochrome"]').click({ force: true });
cy.get('[data-testid="map-style-item-Monochrome"]').click({ force: true });
cy.get('[data-testid="map-style-item-Monochrome"]').should("have.class", "mb-style-container selected");

cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.Grab.StandardLight"]').click({ force: true });
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.Grab.StandardLight"]').click({ force: true });
cy.get('[data-testid="confirmation-button"]').click({ force: true });
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.Grab.StandardLight"]').should(
"have.class",
"mb-style-container selected"
);
cy.get('[data-testid="map-style-item-Hybrid"]').click({ force: true });
cy.get('[data-testid="map-style-item-Hybrid"]').click({ force: true });
cy.get('[data-testid="map-style-item-Hybrid"]').should("have.class", "mb-style-container selected");

cy.wait(5000);
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.OpenData.StandardLight"]').click({ force: true });
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.OpenData.StandardLight"]').click({ force: true });
cy.get('[data-testid="confirmation-button"]').click({ force: true });
cy.get('[data-testid="map-style-item-location.aws.com.demo.maps.OpenData.StandardLight"]').should(
"have.class",
"mb-style-container selected"
);
cy.get('[data-testid="map-style-item-Satellite"]').click({ force: true });
cy.get('[data-testid="map-style-item-Satellite"]').click({ force: true });
cy.get('[data-testid="map-style-item-Satellite"]').should("have.class", "mb-style-container selected");
});
8 changes: 3 additions & 5 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Cypress.Commands.add("connectAwsAccount", isResponsive => {
: cy.get('[data-testid="hamburger-menu"]').click();
}
});
cy.wait(15000);
cy.wait(5000);
});

Cypress.Commands.add("signOutAndDisconnectFromAwsAccount", isResponsive => {
Expand All @@ -126,9 +126,7 @@ Cypress.Commands.add("signOutAndDisconnectFromAwsAccount", isResponsive => {
? cy.openResponsiveMenu('[data-testid="bottomsheet"]')
: cy.get('[data-testid="hamburger-menu"]').click();
cy.get('[data-testid="disconnect-aws-account-button"]').click();
cy.get('[data-testid="welcome-modal-continue-button"]').click();
isResponsive
? cy.openResponsiveMenu('[data-testid="bottomsheet"]')
: cy.get('[data-testid="hamburger-menu"]').click();
cy.wait(2000);
cy.get('[data-testid="connect-aws-account-button"]').should("exist");
cy.wait(2000);
});
2 changes: 1 addition & 1 deletion cypress/support/routeSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Cypress.Commands.add("swapDepartureAndDestinationAddresses", () => {

Cypress.Commands.add("canSelectAnyRouteMode", () => {
cy.get(".travel-mode").should("have.class", "selected");
cy.get(".travel-mode").should("exist").and("have.length", 3);
cy.get(".travel-mode").should("exist").and("have.length", 4);
});

Cypress.Commands.add("searchRouteWithAvoidTollOption", isResponsive => {
Expand Down
Loading

0 comments on commit 3eab7c3

Please sign in to comment.