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):
@step(u'I navigate to a section')
def when_i_navigate_to_a_section(step):
section_css = 'h3[tabindex="-1"]'
world.css_click(section_css)
# Open the 2nd section
world.css_click(css_selector='div.chapter', index=1)
subsection_css = 'a[href*="Test_Subsection_2/"]'
subid = "ui-accordion-accordion-panel-1"
world.wait_for_visible("#" + subid)
subsection_css = "ul.ui-accordion-content-active[id='{}'] > li > a".format(subid)
# Click on the subsection to see the content
world.css_click(subsection_css)
@step(u'I navigate to a subsection')
def when_i_navigate_to_a_subsection(step):
subsection_css = 'ul[id="ui-accordion-accordion-panel-0"]> li > a'
world.css_click(subsection_css, index=1)
# Click on the 2nd subsection to see the content
subsection_css = 'a[href*="Test_Subsection_2/"]'
world.css_click(subsection_css)
@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