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

[ALS-1798] Added maplibre-gl #114

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,12 @@ jobs:
echo "VITE_PRICING_PAGE=${{ secrets.VITE_PRICING_PAGE }}" >> .env
echo "VITE_CUSTOM_ASSETS_URL=${{ secrets.VITE_CUSTOM_ASSETS_URL }}" >> .env

- name: Clone the amazon-location-web-marketing repository
run: |
mkdir -p ../amazon-location-web-marketing-temp
git clone --branch main https://${{ secrets.GH_USERNAME }}:${{ secrets.GH_PAT }}@github.com/aws-geospatial/amazon-location-web-marketing.git ../amazon-location-web-marketing-temp

- name: Create build
run: npm run create-build-with-demo-lib
- name: Install dependencies
run: npm install

- name: Run build
- name: Run local server
run: |
npm run start-build &
npm run dev &
echo "Server started"
sleep 10

Expand Down
4 changes: 3 additions & 1 deletion cypress/e2e/userCanViewTheirCurrentLocation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
describe("Current location", () => {
it("CL-001 - should allow user to see their current location", { scrollBehavior: false }, () => {
cy.visitDomain(`${Cypress.env("WEB_DOMAIN")}/demo`);
cy.get('[class="mapboxgl-user-location-dot mapboxgl-marker mapboxgl-marker-anchor-center"]').should("be.visible");
cy.get('[class="maplibregl-user-location-dot maplibregl-marker maplibregl-marker-anchor-center"]').should(
"be.visible"
);
});
});
4 changes: 2 additions & 2 deletions cypress/e2e/userIsAbleToSearch.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ describe("Search", () => {
.wait(10000)
.type("{downArrow}")
.type("{enter}");
cy.get('[class="mapboxgl-popup popup-container mapboxgl-popup-anchor-left"]').should("be.visible");
cy.get('[class="maplibregl-popup popup-container maplibregl-popup-anchor-left"]').should("be.visible");
}
);

it("DS-003 - should allow user to search by geocode", { scrollBehavior: false }, () => {
cy.get('[inputmode="search"]').type("-31.9627092,115.9248736").wait(10000).type("{downArrow}").type("{enter}");
cy.get('[class="mapboxgl-popup popup-container mapboxgl-popup-anchor-left"]').should("be.visible");
cy.get('[class="maplibregl-popup popup-container maplibregl-popup-anchor-left"]').should("be.visible");
});

it("DS-004 - should allow user to view the POIs after a search", { scrollBehavior: false }, () => {
Expand Down
12 changes: 6 additions & 6 deletions cypress/support/routeSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Cypress.Commands.add("searchRouteAndSelectCurrentLocation", () => {
cy.wait(2000);
cy.get('[placeholder="To"]').click().type("Gramercy Park", { delay: 200 });
cy.contains("Gramercy Park").click({ force: true });
cy.get('[class="mapboxgl-marker mapboxgl-marker-anchor-center"]').eq(0).should("be.visible");
cy.get('[class="mapboxgl-marker mapboxgl-marker-anchor-center"]').eq(1).should("be.visible");
cy.get('[class="maplibregl-marker maplibregl-marker-anchor-center"]').eq(0).should("be.visible");
cy.get('[class="maplibregl-marker maplibregl-marker-anchor-center"]').eq(1).should("be.visible");
});

Cypress.Commands.add("swapDepartureAndDestinationAddresses", () => {
Expand All @@ -18,11 +18,11 @@ Cypress.Commands.add("swapDepartureAndDestinationAddresses", () => {
cy.get('[placeholder="To"]').click().type("Gramercy Park", { delay: 200 });
cy.contains("Gramercy Park").click({ force: true });
cy.wait(10000);
cy.get('[class="mapboxgl-marker mapboxgl-marker-anchor-center"]').eq(0).should("be.visible");
cy.get('[class="mapboxgl-marker mapboxgl-marker-anchor-center"]').eq(1).should("be.visible");
cy.get('[class="maplibregl-marker maplibregl-marker-anchor-center"]').eq(0).should("be.visible");
cy.get('[class="maplibregl-marker maplibregl-marker-anchor-center"]').eq(1).should("be.visible");
cy.get('[class="amplify-flex swap-icon-container"]').click();
cy.get('[class="mapboxgl-marker mapboxgl-marker-anchor-center"]').eq(0).should("be.visible");
cy.get('[class="mapboxgl-marker mapboxgl-marker-anchor-center"]').eq(1).should("be.visible");
cy.get('[class="maplibregl-marker maplibregl-marker-anchor-center"]').eq(0).should("be.visible");
cy.get('[class="maplibregl-marker maplibregl-marker-anchor-center"]').eq(1).should("be.visible");
cy.get('[class="amplify-flex swap-icon-container"]').click();
});

Expand Down
8 changes: 4 additions & 4 deletions cypress/support/trackerAndGeofenceSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Cypress.Commands.add("addTrackerAndGeofenceEnterExit", (isResponsive, geofenceNa
cy.wait(5000);
cy.contains("Continue").click();
cy.wait(5000);
cy.get('[class="mapboxgl-canvas"]').click("left", { force: true });
cy.get('[class="maplibregl-canvas"]').click("left", { force: true });
cy.wait(5000);
isResponsive
? cy.get('[class="mapboxgl-canvas"]').click(200, 200, { force: true })
: cy.get('[class="mapboxgl-canvas"]').click("right", { force: true });
? cy.get('[class="maplibregl-canvas"]').click(200, 200, { force: true })
: cy.get('[class="maplibregl-canvas"]').click("right", { force: true });
cy.wait(5000);
cy.get('[class="mapboxgl-canvas"]').click("right", { force: true });
cy.get('[class="maplibregl-canvas"]').click("right", { force: true });
cy.wait(5000);
cy.contains("Save").click();
cy.wait(5000);
Expand Down
58 changes: 0 additions & 58 deletions extra/create-build-with-demo-lib/index.js

This file was deleted.

11 changes: 0 additions & 11 deletions extra/create-build-with-demo-lib/package.json

This file was deleted.

Loading
Loading