-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
[Jest] Browser tests #810
[Jest] Browser tests #810
Conversation
Bundle size report: Size Change: 0 B
ℹ️ View DetailsNo major changes |
The tests fail because "map" is undefined. Both the drag and zoom test load html file test/browser/fixtures/land.html where it's defined, but map doesn't seem to be passed to the local scope of the jest tests. Any ideas how to fix the browser tests would be appreciated :) Can we i.e. somehow import the maplibre build directly in the browser.test.ts, rather than through the html file? |
I would focus on finish migrating the rest of the unit tests as these tests are more integration tests...? |
The end seems to be near for unit tests. I believe the ajax.test.ts is ready to be merged, and image_source is in progress too, which are the only two places tap is used apart from the browser and build tests. |
I had no clue we were finishing up with the unit tests, so cool!! :-) |
I'll have a go at the build tests then |
I've reviewed the changes. |
I am re-running the tests. Double-click often fails for no good reason. |
51fb691
to
5cb9866
Compare
This seems to be working now. The missing piece was likely bumping selenium-webdriver to 4.1.1, which adds support for chrome 97. (#827 ) |
browser.test.js was used to generate before each and after each for drag.test.js and zoom.test.js. I combined them all in browser.test.ts, as it's much easier to reason about.
Change jest.config.cjs to:
Run
npm install
npm run test-jest -- test/browser/browser