Skip to content

Conversation

@tborres
Copy link

@tborres tborres commented Jul 30, 2014

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!

tborres added 3 commits July 30, 2014 16:49
False by default. This config can be set to true so that the plugin will
not warn the user on page reload. This may be useful on a live sites
where reload warnings are not necessary, but it is especially useful to
turn this off when karma e2e tests for applications.
@facultymatt facultymatt modified the milestone: 0.2.x Nov 1, 2014
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