Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Fix the broken validations test #585

Merged
merged 1 commit into from
Sep 18, 2014

Conversation

djansen-redhat
Copy link
Contributor

The validation error box function was not searching the right place
for the appropriate component.

getDriver().findElement(By.className("selected"))
.findElements(By.className("transUnitCol"))
.get(1) // Right column
.findElement(By.className("gwt-DisclosurePanel"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of repeating transUnitCol, 1 and gwt-DisclosurePanel, perhaps we could extract constants to reuse?

Or better still, extract a method like:

Element findGwtDisclosurePanel(Driver driver) {
    return driver.findElement(By.className("selected"))
        .findElements(By.className("transUnitCol"))
        .get(1) // Right column
        .findElement(By.className("gwt-DisclosurePanel"))
}

And use it in all four places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the latter. Was going to do it in a later change, but here is appropriate.

The validation error box function was not searching the right place
for the appropriate component.
@seanf
Copy link
Contributor

seanf commented Sep 18, 2014

👍

djansen-redhat added a commit that referenced this pull request Sep 18, 2014
@djansen-redhat djansen-redhat merged commit 4bdcada into integration/master Sep 18, 2014
@djansen-redhat djansen-redhat deleted the fix-broken-validation-test branch September 18, 2014 00:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants