Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Another Round of Selenium Fixes and Improvements #4753
This also includes various fixes aimed at getting the newer library tests to work under Jenkins -
This includes 36863f5 which forces Selenium to target a Galaxy using a proxy-prefix (superseding #4709) - so we will catch more proxy prefix related bugs ideally along with numerous fixes for the tests when run against such a Galaxy in 225ad7f.
225ad7f in addition to bundling some fixes includes includes another set of improvements to the navigation YAML reworking. From the commit message:
So the old
The following a very basic example of this:
def click_masthead_user(self): - self.wait_for_and_click(self.navigation.masthead.selectors.user) + self.components.masthead.user.wait_for_and_click()
Here is an example of combining it with the new child selector syntax:
def assert_item_dbkey_displayed_as(self, hid, dbkey): - item_body_selector = self.history_panel_item_body_selector(hid=hid, wait=True) - dbkey_selector = item_body_selector + ' ' + self.test_data["historyPanel"]["selectors"]["hda"]["dbkey"] - dbkey_element = self.wait_for_selector_visible(dbkey_selector) - assert dbkey in dbkey_element.text + item_body = self.history_panel_item_component(hid=hid) + dbkey_text = item_body.dbkey.wait_for_text() + assert dbkey in dbkey_text
Before I found moving raw constants into the YAML file after I had written a test a chore and indeed community contributed tests never added to the YAML. I think with this reworking of things - people (myself included) will really be encouraged to fillout the YAML file and use these abstract selectors upfront. Hopefully having a semi-stable representation of Galaxy's components in this way will eventually prove helpful in other contexts so as when writing tours or building automated applications in other frameworks (the way I was able to reuse some of what Carl had done with the YAML when switching to Selenium).
Here is a link for these tests passing again on Jenkins: