Skip to content

Conversation

vgeorge
Copy link
Member

@vgeorge vgeorge commented Oct 7, 2025

Summary

This PR introduces the initial Playwright setup for automated UI testing.

Changes introduced

  • Added Playwright configuration and bbox selection spec
  • Updated project scripts to include test:e2e command
  • Bumped Deck.gl to v9.1.15 for compatibility

Description

This sets up the foundation for end-to-end testing using Playwright.
The current configuration includes a basic test that validates bounding box selection. This will help ensure UI stability and make it easier to expand automated test coverage over time.

How to review

  • Run npm run test:e2e, all tests should pass
  • Review the Playwright folder structure and configuration under tests/e2e/
  • Confirm the test runs locally without additional setup

Follow-ups

  • Integrate Playwright tests into CI
  • Add coverage for more map and UI components

- Set up Playwright with isolated JupyterLab instance (port 8889)
- Expose DeckGL instance via React ref for programmatic access
- Create test helpers for DeckGL canvas interactions (deckClick, deckHover, deckDrag)
- Create notebook helpers for JupyterLab operations
- Implement bbox selection test that verifies selected_bounds syncs to Python
- Add test scripts: test:e2e, test:e2e:ui, jupyter:test

DeckGL canvas interactions bypass DOM events and call handlers directly
via deck.pickObject() and deck.props.onClick/onHover, enabling automated
testing of map interactions.
@vgeorge vgeorge requested a review from kylebarron October 7, 2025 15:42
@vgeorge vgeorge changed the title Feat: add Globe View and automated UI testing with Playwright feat: add Globe View and automated UI testing with Playwright Oct 7, 2025
@github-actions github-actions bot added the feat label Oct 7, 2025
Add vitest configuration to exclude tests/e2e/** directory from vitest
runs. This prevents vitest from attempting to execute Playwright test
files, which was causing CI failures.

The e2e tests should only be run via the dedicated test:e2e npm script
which uses Playwright's test runner.
Resolved conflicts in package.json and package-lock.json by removing
duplicate deck.gl dependency entries that were present in main.
@kylebarron
Copy link
Member

Thanks for this! I'll write up some more thoughts, but first, could we split the playwright tests into a separate PR? I think that part is quite valuable on its own and will be relatively easy to merge while the globe view might take a little longer to architect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these types not exported from a deck.gl module?

Copy link
Member Author

@vgeorge vgeorge Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They probably are, I'll check.

@vgeorge
Copy link
Member Author

vgeorge commented Oct 8, 2025

@kylebarron sounds good, I'll create a separated PR just for the playwright implementation.

@kylebarron
Copy link
Member

deck.gl now works seamlessly with the MapLibre v5 globe view for all three Basemap Intergration Modes

It's possible we may not need to use MapboxOverlay at all for globe view https://deck.gl/docs/whats-new#globe-view--maplibre

@kylebarron
Copy link
Member

See #908 for what I'm thinking of for the Python side, and then when that's serialized to the JS side, we'd switch on the basemap.mode attribute to decide whether to render MapboxOverlay or not

@kylebarron
Copy link
Member

The failing test is just a formatting lint to use double string quotes in your ipynb

@vgeorge vgeorge changed the title feat: add Globe View and automated UI testing with Playwright feat: automated UI testing with Playwright Oct 9, 2025
Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it complex to run these on CI? I figure it might be because it requires a headless browser, right?

If so, it's fine to leave that for the future, but we should create an issue so we don't forget.

@vgeorge
Copy link
Member Author

vgeorge commented Oct 9, 2025

@kylebarron I’ve updated the PR title and description, and addressed your comments. Some type definitions aren’t exposed by Deck.gl. I didn’t have time to look deeper, so I’d suggest we revisit that later. We should also document how to install the pre-commit checks for Python. Regarding the CI checks, that’s definitely a must but not sure about complexity. Let’s track it in a separate ticket.

@vgeorge vgeorge requested a review from kylebarron October 9, 2025 18:58
Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kylebarron kylebarron merged commit 163dfb7 into main Oct 10, 2025
6 checks passed
@kylebarron kylebarron deleted the feat/playwright-e2e-setup branch October 10, 2025 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants