Skip to content
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

Merged
merged 1 commit into from Jan 1, 2017

Conversation

leonard84
Copy link
Contributor

@leonard84 leonard84 commented Nov 21, 2016

No description provided.

Copy link
Member

@erdi erdi left a 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() {
Copy link
Member

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) {
Copy link
Member

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'() {
Copy link
Member

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?

@erdi erdi merged commit acb5d6c into geb:master Jan 1, 2017
@erdi
Copy link
Member

erdi commented Jan 1, 2017

I applied the changes previously requested myself. Thanks for the contribution @leonard84!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants