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

Add globe/mercator button #963

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add globe/mercator button #963

wants to merge 8 commits into from

Conversation

wipfli
Copy link

@wipfli wipfli commented Jan 4, 2025

Launch Checklist

Adds a button for choosing the projection globe or mercator. Appears under the light settings. Live demo is here: https://wipfli.github.io/maputnik/?layer=1455082206%7E0&modal=settings#1.02/0/0

image

  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Add an entry to CHANGELOG.md under the ## main section.

.github/workflows/deploy.yml Outdated Show resolved Hide resolved
@HarelM
Copy link
Collaborator

HarelM commented Jan 4, 2025

I would recommend adding a test...

@wipfli
Copy link
Author

wipfli commented Jan 4, 2025

Do you mind helping me with the test? I don't know cypress but happy to learn about it if you can help me a bit

@HarelM
Copy link
Collaborator

HarelM commented Jan 4, 2025

sure, this repo has a good practice when it comes to end-to-end tests.
There's the driver which is the low level usage of cypress, usually, you won't need to touch it:
https://github.com/maplibre/maputnik/blob/main/cypress/e2e/maputnik-driver.ts
There's the helper which obscures how the UI looks and facilitate function to use in the tests so that the tests should look like a flow given-when-then style, but it's very slim in this case:
https://github.com/maplibre/maputnik/blob/main/cypress/e2e/maputnik-cypress-helper.ts
And there's the relevant test, since you added your functionality in a modal I would start by looking at a similar test here:
https://github.com/maplibre/maputnik/blob/main/cypress/e2e/modals.cy.ts

Let me know if the above is enough or not.
Thanks!

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.

2 participants