Commit 159f020d by Jay Zoldak

Merge pull request #1399 from edx/zoldak/fix-lms-navigation-tests

Change logic for section selection in navigation tests.
parents 70e5e80e 494a618c
...@@ -88,20 +88,19 @@ def view_course_multiple_sequences(step): ...@@ -88,20 +88,19 @@ def view_course_multiple_sequences(step):
@step(u'I navigate to a section') @step(u'I navigate to a section')
def when_i_navigate_to_a_section(step): def when_i_navigate_to_a_section(step):
section_css = 'h3[tabindex="-1"]' # Open the 2nd section
world.css_click(section_css) world.css_click(css_selector='div.chapter', index=1)
subsection_css = 'a[href*="Test_Subsection_2/"]'
subid = "ui-accordion-accordion-panel-1" # Click on the subsection to see the content
world.wait_for_visible("#" + subid)
subsection_css = "ul.ui-accordion-content-active[id='{}'] > li > a".format(subid)
world.css_click(subsection_css) world.css_click(subsection_css)
@step(u'I navigate to a subsection') @step(u'I navigate to a subsection')
def when_i_navigate_to_a_subsection(step): def when_i_navigate_to_a_subsection(step):
subsection_css = 'ul[id="ui-accordion-accordion-panel-0"]> li > a' # Click on the 2nd subsection to see the content
world.css_click(subsection_css, index=1) subsection_css = 'a[href*="Test_Subsection_2/"]'
world.css_click(subsection_css)
@step(u'I navigate to an item in a sequence') @step(u'I navigate to an item in a sequence')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment