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
Fix for #450 unexpected pages are now checked after the atCheck fails #127
Conversation
b2d4e21
to
fea3f34
Compare
fea3f34
to
acb5d6c
Compare
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.
Other than the couple of small changes requested it LGTM. This will be a nice perf improvement if unexpected pages are used.
Don't forget to add yourself to contributors at https://github.com/geb/geb/blob/master/doc/manual/src/docs/asciidoc/140-project.adoc#contributors and add your fix to changelog at https://github.com/geb/geb/blob/master/doc/manual/src/docs/asciidoc/140-project.adoc#imporevements
errorThrown | ||
} | ||
|
||
boolean getAtResult() { |
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.
This method is unused and thus unnecessary.
def verificationResult = getAtVerificationResult(true) | ||
if (!verificationResult) { | ||
getInitializedBrowser().checkIfAtAnUnexpectedPage(getClass()) | ||
if (verificationResult.errorThrown) { |
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.
Instead of exposing errorThrown
property please add AtVerificationResult.rethrowAnyErrors()
which will possibly throw the error if one has occurred and use it here.
at ExpectedPage | ||
} | ||
|
||
void 'unexpected pages are checked only if the atCheck for the expected page fails'() { |
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.
I think that this test is redundant because it tests the exact same path as the one which follows, i.e. an exception is thrown when we end up at an unexpected page
. Or am I'm missing something?
I applied the changes previously requested myself. Thanks for the contribution @leonard84! |
No description provided.