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

Map screenshot utility for alert #1414

Merged
merged 15 commits into from
Jan 30, 2025

Conversation

Doniaab
Copy link
Collaborator

@Doniaab Doniaab commented Jan 16, 2025

Description

Screenshot Utility for Alerting System

new utility function to the alerting system that automates capturing a screenshot of the map displayed on a web application. The utility uses a provided URL to load the map, ensures all required elements are fully rendered, and captures screenshot of the element.

Use example :

await captureScreenshotFromUrl({
url: 'http://localhost:3000/?hazardLayerIds=anticipatory_action_storm&date=2025-01-14',
elementToScreenshot: '.maplibregl-canvas',
elementsToHide: ['.MuiDrawer-root', '.MuiList-root', '.MuiGrid-root'],
crop: {
x: 900,
y: 200,
width: 1000,
height: 800,
},
});

How to test the feature:

  • [ ]
  • [ ]

Checklist - did you ...

Test your changes with

  • REACT_APP_COUNTRY=rbd yarn start
  • REACT_APP_COUNTRY=cambodia yarn start
  • REACT_APP_COUNTRY=mozambique yarn start
  • Add / update necessary tests?
  • Add / update outdated documentation?

Screenshot/video of feature:

Copy link

github-actions bot commented Jan 16, 2025

Build succeeded and deployed at https://prism-1414.surge.sh
(hash c4cbe33 deployed at 2025-01-30T09:43:48)

@Max-Z80
Copy link
Collaborator

Max-Z80 commented Jan 17, 2025

@Doniaab : I am done with the review.

@Max-Z80 Max-Z80 self-requested a review January 28, 2025 09:43
@ericboucher ericboucher marked this pull request as ready for review January 28, 2025 15:29
@Doniaab Doniaab merged commit 5f1ef9b into feature/add-new-AA-storm Jan 30, 2025
6 checks passed
@Doniaab Doniaab deleted the map-screenshot-for-alert branch January 30, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants