Configurable Selectors in Integration Tests

Registered by Radomir Dopieralski

Horizon's integration tests are written assuming the default theme is being used. Other themes might have a different structure of the underlying HTML, and would require modifying the selectors used in the tests to make them work properly. This proposes to make those selectors configurable in the local-horizon.conf file, so that the integration tests can be run with a non-default theme as well.

For example, in regions/bars.py the TopBarRegion class has selectors that assume the user drop-down menu is on the right hand side: _user_dropdown_menu_locator = (by.By.CSS_SELECTOR, '.nav.navbar-nav.navbar-right'), however in the Red Hat theme that menu is on the left, and that selector needs to be something like '.header .navbar .navbar-inner'. We could do this by introducing a [selectors]top_bar_region__user_dropdown_menu_locator setting, that would default to the default theme, but could be changed for testing with any other theme.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Radomir Dopieralski
Direction:
Needs approval
Assignee:
Radomir Dopieralski
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Radomir Dopieralski

Related branches

Sprints

Whiteboard

Turns out that the changes necessary to make other themes work are too complex to put them in the config easily. We are just doing a patch on top of the upstream repository instead.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.