Skip to content

Commit

Permalink
Merge pull request #262 from aws-geospatial/ALS-1847_updated-menu-items
Browse files Browse the repository at this point in the history
[ALS-1847] Updated menu items
  • Loading branch information
mbalfour-amzn authored Oct 1, 2024
2 parents 24f3df9 + 56d37b0 commit 19e4f91
Show file tree
Hide file tree
Showing 41 changed files with 2,363 additions and 317 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ VITE_MIGRATE_AN_ANDROID_APP_PAGE=1
VITE_MIGRATE_AN_IOS_APP_PAGE=1
VITE_MIGRATE_A_WEB_SERVICE_PAGE=1
VITE_PRICING_PAGE=1
VITE_SHOW_NEW_NAVIGATION=1

# optional
VITE_NL_BASE_URL=https://XXXXXXXXXX.execute-api.XX-XXXX-X.amazonaws.com/api
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
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
run: npm install
Expand All @@ -51,8 +52,6 @@ jobs:
- name: Run cypress tests
env:
CYPRESS_WEB_DOMAIN: ${{ secrets.WEB_DOMAIN }}
CYPRESS_WEB_DOMAIN_USERNAME: ${{ secrets.WEB_DOMAIN_USERNAME }}
CYPRESS_WEB_DOMAIN_PASSWORD: ${{ secrets.WEB_DOMAIN_PASSWORD }}
CYPRESS_IDENTITY_POOL_ID: ${{ secrets.IDENTITY_POOL_ID }}
CYPRESS_USER_DOMAIN: ${{ secrets.USER_DOMAIN }}
CYPRESS_USER_POOL_CLIENT_ID: ${{ secrets.USER_POOL_CLIENT_ID }}
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
- `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`.
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_PAG` can either be `1` or `0` to either enable or disable the respective pages.
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

Expand All @@ -29,6 +30,7 @@
> VITE_MIGRATE_AN_IOS_APP_PAGE<br />
> VITE_MIGRATE_A_WEB_SERVICE_PAGE<br />
> VITE_PRICING_PAGE<br />
> VITE_SHOW_NEW_NAVIGATION<br />
#### Env keys optional in `.env` file, see `.env.example` for reference
> VITE_NL_BASE_URL<br />
Expand Down Expand Up @@ -108,6 +110,7 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
> VITE_MIGRATE_A_WEB_SERVICE_PAGE
> VITE_PRICING_PAGE
> VITE_CUSTOM_ASSETS_URL
> VITE_SHOW_NEW_NAVIGATION
```

#### `npm run cypress`
Expand Down
24 changes: 17 additions & 7 deletions cypress/e2e/userIsAbleToUseTheSidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ describe("Sidebar", () => {
cy.visitDomain(`${Cypress.env("WEB_DOMAIN")}/demo`);
cy.get('[data-testid="hamburger-menu"]').click();
cy.get("div")
.should("contain", "Demo")
.and("contain", "Geofence")
.and("contain", "Tracker")
.and("contain", "Settings")
.and("contain", "Samples");
.should("contain", "Samples")
.and("contain", "Migration")
.and("contain", "Overview")
.and("contain", "Products")
.and("contain", "Getting Started")
.and("contain", "Pricing")
.and("contain", "FAQs")
.and("contain", "Industry")
.and("contain", "Resources");
});
});

Expand All @@ -29,10 +33,16 @@ describe("Sidebar", () => {
cy.get('[data-testid="iconic-info-card-title"]')
.should("contain", "Samples")
.and("contain", "Migration")
.and("contain", "Pricing")
.and("contain", "Settings")
.and("contain", "About")
.and("contain", "Provide Feedback");
.and("contain", "Provide Feedback")
.and("contain", "Overview")
.and("contain", "Products")
.and("contain", "Getting Started")
.and("contain", "Pricing")
.and("contain", "FAQs")
.and("contain", "Industry")
.and("contain", "Resources");
}
);
});
Expand Down
10 changes: 1 addition & 9 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ Cypress.Commands.add("visitDomain", domain => {
});

if (typeof domain === "string") {
domain.includes("dev")
? cy.visit(domain, {
auth: {
username: Cypress.env("WEB_DOMAIN_USERNAME"),
password: Cypress.env("WEB_DOMAIN_PASSWORD")
}
})
: cy.visit(domain);

cy.visit(domain);
cy.wait(10000);
cy.get('[data-testid="welcome-modal-continue-button"]').click();
}
Expand Down
1 change: 1 addition & 0 deletions src/assets/svgs/icon-customers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-developer-resources.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-financial-service.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-geofences-trackers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-healthcare.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-places-new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-product-resources.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-real-estate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-retail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svgs/icon-travel-hospitality.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/svgs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,13 @@ export { ReactComponent as IconBrandAndroid } from "./icon-brand-android.svg";
export { ReactComponent as IconDollarSolid } from "./icon-dollar-solid.svg";
export { ReactComponent as IconSwap } from "./icon-swap.svg";
export { ReactComponent as Simulation } from "./simulation.svg";
export { ReactComponent as IconPlacesNew } from "./icon-places-new.svg";
export { ReactComponent as IconGeofencesTrackers } from "./icon-geofences-trackers.svg";
export { ReactComponent as IconFinancialService } from "./icon-financial-service.svg";
export { ReactComponent as IconHealthcare } from "./icon-healthcare.svg";
export { ReactComponent as IconRetail } from "./icon-retail.svg";
export { ReactComponent as IconTravelHospitality } from "./icon-travel-hospitality.svg";
export { ReactComponent as IconRealEstate } from "./icon-real-estate.svg";
export { ReactComponent as IconProductResources } from "./icon-product-resources.svg";
export { ReactComponent as IconDeveloperResources } from "./icon-developer-resources.svg";
export { ReactComponent as IconCustomers } from "./icon-customers.svg";
7 changes: 5 additions & 2 deletions src/atomicui/atoms/List/List.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ describe("<List/>", () => {
const listArray = [
...[...Array(2)].map(() => ({
label: faker.random.word(),
link: faker.internet.url()
link: faker.internet.url(),
isExternalLink: true
})),
{
label: faker.random.word(),
link: "/somewhere",
isExternalLink: false,
subMenu: [
{
label: faker.random.word(),
link: "/somewhere"
link: "/somewhere",
isExternalLink: false
}
]
}
Expand Down
Loading

0 comments on commit 19e4f91

Please sign in to comment.