From 274824bf55eb177b71cbf953828be882442ec4d2 Mon Sep 17 00:00:00 2001 From: Will Daly Date: Wed, 5 Feb 2014 12:41:43 -0500 Subject: [PATCH] Updated bok-choy tests for a11y css selector changes Disable broken video test --- common/test/acceptance/pages/lms/open_response.py | 2 +- common/test/acceptance/pages/lms/progress.py | 8 ++++---- common/test/acceptance/pages/lms/video.py | 2 +- common/test/acceptance/tests/test_lms.py | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/common/test/acceptance/pages/lms/open_response.py b/common/test/acceptance/pages/lms/open_response.py index cc042d1199..eb80530730 100644 --- a/common/test/acceptance/pages/lms/open_response.py +++ b/common/test/acceptance/pages/lms/open_response.py @@ -14,7 +14,7 @@ class OpenResponsePage(PageObject): url = None def is_browser_on_page(self): - return self.is_css_present('section.xmodule_CombinedOpenEndedModule') + return self.is_css_present('div.xmodule_CombinedOpenEndedModule') @property def assessment_type(self): diff --git a/common/test/acceptance/pages/lms/progress.py b/common/test/acceptance/pages/lms/progress.py index 9a6d8882a1..739beaa705 100644 --- a/common/test/acceptance/pages/lms/progress.py +++ b/common/test/acceptance/pages/lms/progress.py @@ -13,7 +13,7 @@ class ProgressPage(CoursePage): URL_PATH = "progress" def is_browser_on_page(self): - has_course_info = self.is_css_present('section.course-info') + has_course_info = self.is_css_present('div.course-info') has_graph = self.is_css_present('div#grade-detail-graph') return has_course_info and has_graph @@ -45,7 +45,7 @@ class ProgressPage(CoursePage): Return the CSS index of the chapter with `title`. Returns `None` if it cannot find such a chapter. """ - chapter_css = 'ol.chapters li h2' + chapter_css = 'div.chapters section h2' chapter_titles = self.css_map(chapter_css, lambda el: el.text.lower().strip()) try: @@ -64,7 +64,7 @@ class ProgressPage(CoursePage): # This is a hideous CSS selector that means: # Get the links containing the section titles in `chapter_index`. # The link text is the section title. - section_css = 'ol.chapters>li:nth-of-type({0}) ol.sections li h3 a'.format(chapter_index) + section_css = 'div.chapters>section:nth-of-type({0}) div.sections div h3 a'.format(chapter_index) section_titles = self.css_map(section_css, lambda el: el.text.lower().strip()) # The section titles also contain "n of m possible points" on the second line @@ -91,7 +91,7 @@ class ProgressPage(CoursePage): # This is CSS selector means: # Get the scores for the chapter at `chapter_index` and the section at `section_index` # Example text of the retrieved elements: "0/1" - score_css = "ol.chapters>li:nth-of-type({0}) ol.sections>li:nth-of-type({1}) section.scores>ol>li".format( + score_css = "div.chapters>section:nth-of-type({0}) div.sections>div:nth-of-type({1}) div.scores>ol>li".format( chapter_index, section_index ) diff --git a/common/test/acceptance/pages/lms/video.py b/common/test/acceptance/pages/lms/video.py index 6adc2a44ee..0ae19082f1 100644 --- a/common/test/acceptance/pages/lms/video.py +++ b/common/test/acceptance/pages/lms/video.py @@ -17,7 +17,7 @@ class VideoPage(PageObject): url = None def is_browser_on_page(self): - return self.is_css_present('section.xmodule_VideoModule') + return self.is_css_present('div.xmodule_VideoModule') @property def elapsed_time(self): diff --git a/common/test/acceptance/tests/test_lms.py b/common/test/acceptance/tests/test_lms.py index 15bd3aed58..b3573566f7 100644 --- a/common/test/acceptance/tests/test_lms.py +++ b/common/test/acceptance/tests/test_lms.py @@ -2,6 +2,8 @@ E2E tests for the LMS. """ +from unittest import skip + from bok_choy.web_app_test import WebAppTest from bok_choy.promise import EmptyPromise, fulfill_before @@ -213,6 +215,7 @@ class VideoTest(UniqueCourseTest): # Auto-auth register for the course AutoAuthPage(self.browser, course_id=self.course_id).visit() + @skip("BLD-563: Video Player Stuck on Pause") def test_video_player(self): """ Play a video in the courseware.