-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Test improvements #8642
Merged
Merged
Test improvements #8642
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows us to setup the fileMap correctly for testing so that it never tries to fetch assets from the CDN.
This avoids the numerous "missing translation" errors filling up the console
- Before it wasn't actually loading the intro graph because assetPath not set - The test for Three Rivers City Hall was using the wrong nodeid - All these test errors were being ignored because of the use of .finally(done) - To actually make an error happen, we can call `done(err)` with the Error
10 tasks
init kicks off building the ui, which can fetch spritesheets for the <defs> The assetPath needs to be set otherwise these files will not be found
By default, the `rendererBackground` code will choose an initial imagery based on what sources are available at the given map location. It looks like this code will fallback to "custom" _before_ "none", and I noticed that in some cases it was trying to fetch whatever source happened to be stored in the "custom" template in localStorage. This commit adds an explicit window.location.hash in a few places to encourage the background layer to be "none". Some tests do change the hash, so this isn't perfect.
The pointer events use a different mechanism for counting clicks that doesn't work when the tests are run in a real browser like Chrome. This change forces iD to always use mouse events during testing, even in a real browser.
mbrzakovic
approved these changes
Sep 28, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A bunch of fixes for the tests.
4f1d5f0 Similar to e7ad384, avoid using finally(done) as it swallows errors
e7ad384 Fix file fetcher tests that touch the intro_graph
done(err)
with the Error1282d3b Don't use a util function for a thing that exists 1x in the code
746417e Fix coreLocations tests access of locationSetID property
5aee120 Prefill the locale_tagging_en with fake string data
This avoids the numerous "missing translation" errors filling up the console
bb84962 Only insert sources into the fileMap if not already there
This allows us to setup the fileMap correctly for testing so that it never tries to fetch assets from the CDN.