Skip to content

Commit

Permalink
Using new is_focused method
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Rodriguez committed Oct 23, 2015
1 parent ecb26d5 commit cf1c901
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions common/test/acceptance/pages/lms/course_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ def verify_skip_to_container_exists(self):
self.q(css=skip_href).is_present, "Main content area is present"
).fulfill()

# def skip_to_main_content(self):
# """
# Checks to make sure the skip link skips to its href
# and the container receives focus.
# """
# skip_to = self.q(css=".nav-skip").attrs('href')[0]
# skip_href = skip_to.split('/')[-1]
# self.q(css=skip_href).click
# self.wait_for(
# self.q(css=skip_href).is_focused, "Main content area is focusable'"
# )
def skip_to_main_content(self):
"""
Checks to make sure the skip link skips to its href
and the container receives focus.
"""
skip_to = self.q(css=".nav-skip").attrs('href')[0]
skip_href = skip_to.split('/')[-1]
self.q(css=skip_href).click
self.wait_for(
self.q(css=skip_href).is_focused, "Main content area is focusable'"
)
2 changes: 1 addition & 1 deletion common/test/acceptance/tests/lms/test_lms_courseware.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def test_skip_navigation(self):
self.courseware_page.verify_skip_to_container_exists()

# Activate the link and expect focus to be on the #href
# self.courseware_page.skip_to_main_content()
self.courseware_page.skip_to_main_content()


class ProctoredExamTest(UniqueCourseTest):
Expand Down

0 comments on commit cf1c901

Please sign in to comment.