Features/disable reload warning #15
Open
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.
Not sure if this is an especially useful feature or not, but I figured I might as well pull request it.
Issue:
The confirmExit was causing my karma e2e tests (in a separate app) to fail with the error "Some of your tests did a full page reload!". This error does not occur when the reload confirmation window is not present.
Solution:
Added a disableReloadConfirm configuration variable, which defaults to false (thereby defaulting to the existing behavior of confirming with the user that he or she would like to change pages). If this config variable is set to true then the confirmation will not occur. This can be toggled to true when running e2e tests, or any other time that page reload should be allowed but navigation within the application should not.
Testing Notes:
Tests were not created for this because there were failing tests (e2e and unit) on the latest branch. However, it's possible that I may be running the tests incorrectly.
Feedback and suggestions are encouraged and welcome!