From 6544b659ce984110c567e02911c230779713d90c Mon Sep 17 00:00:00 2001 From: Stuart Young Date: Thu, 25 Jan 2018 13:15:44 -0500 Subject: [PATCH] Changes needed to bump to ff59 --- AUTHORS | 2 ++ common/test/acceptance/pages/lms/learner_profile.py | 2 -- common/test/acceptance/pages/studio/container.py | 1 + common/test/acceptance/pages/studio/index.py | 5 ++--- common/test/acceptance/pages/studio/overview.py | 1 + common/test/acceptance/tests/helpers.py | 3 --- common/test/acceptance/tests/lms/test_learner_profile.py | 7 +++++-- common/test/acceptance/tests/lms/test_lms_gating.py | 2 ++ common/test/acceptance/tests/video/test_video_module.py | 1 + requirements/edx/base.txt | 4 ++-- 10 files changed, 16 insertions(+), 12 deletions(-) diff --git a/AUTHORS b/AUTHORS index 2689d93fbd..ad82c26e2d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -287,3 +287,5 @@ Shirley He Po Tsui Rabia Iftikhar Matt Tuchfarber +Stuart Young +Michael Youngstrom diff --git a/common/test/acceptance/pages/lms/learner_profile.py b/common/test/acceptance/pages/lms/learner_profile.py index d8fcdc7e70..361661b673 100644 --- a/common/test/acceptance/pages/lms/learner_profile.py +++ b/common/test/acceptance/pages/lms/learner_profile.py @@ -281,8 +281,6 @@ class LearnerProfilePage(FieldsMixin, PageObject): self.browser.execute_script('$(".upload-button-input").css("opacity",1);') self.wait_for_element_visibility('.upload-button-input', "upload button is visible") - self.browser.execute_script('$(".upload-submit").show();') - self.q(css='.upload-submit').first.click() self.q(css='.upload-button-input').results[0].send_keys(file_path) self.wait_for_ajax() diff --git a/common/test/acceptance/pages/studio/container.py b/common/test/acceptance/pages/studio/container.py index f2669f71b8..dbc7094a25 100644 --- a/common/test/acceptance/pages/studio/container.py +++ b/common/test/acceptance/pages/studio/container.py @@ -192,6 +192,7 @@ class ContainerPage(PageObject, HelpMixin): """ Discards draft changes (which will then re-render the page). """ + self.scroll_to_element('a.action-discard') click_css(self, 'a.action-discard', 0, require_notification=False) confirm_prompt(self) self.wait_for_ajax() diff --git a/common/test/acceptance/pages/studio/index.py b/common/test/acceptance/pages/studio/index.py index d22d00c671..0dfcc67f47 100644 --- a/common/test/acceptance/pages/studio/index.py +++ b/common/test/acceptance/pages/studio/index.py @@ -219,9 +219,8 @@ class DashboardPage(PageObject, HelpMixin): """ # Workaround Selenium/Firefox bug: `.text` property is broken on invisible elements tab_selector = '#course-index-tabs .{} a'.format('archived-courses-tab' if archived else 'courses-tab') - course_tab_link = self.q(css=tab_selector) - if course_tab_link: - course_tab_link.click() + self.wait_for_element_presence(tab_selector, "Courses Tab") + self.q(css=tab_selector).click() div2info = lambda element: { 'name': element.find_element_by_css_selector('.course-title').text, 'org': element.find_element_by_css_selector('.course-org .value').text, diff --git a/common/test/acceptance/pages/studio/overview.py b/common/test/acceptance/pages/studio/overview.py index db2be17699..c190a2692c 100644 --- a/common/test/acceptance/pages/studio/overview.py +++ b/common/test/acceptance/pages/studio/overview.py @@ -503,6 +503,7 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer): Clicks the "View Live" link and switches to the new tab """ click_css(self, '.view-live-button', require_notification=False) + self.wait_for_page() self.browser.switch_to_window(self.browser.window_handles[-1]) def section(self, title): diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py index 5642bfe181..69ed3acb67 100644 --- a/common/test/acceptance/tests/helpers.py +++ b/common/test/acceptance/tests/helpers.py @@ -737,9 +737,6 @@ class AcceptanceTest(WebAppTest): """ def __init__(self, *args, **kwargs): - if 'BOK_CHOY_HOSTNAME' not in os.environ: - # Hack until we upgrade Firefox and install geckodriver in Vagrant and Jenkins - DesiredCapabilities.FIREFOX['marionette'] = False super(AcceptanceTest, self).__init__(*args, **kwargs) # Use long messages so that failures show actual and expected values diff --git a/common/test/acceptance/tests/lms/test_learner_profile.py b/common/test/acceptance/tests/lms/test_learner_profile.py index 46ae742ac7..f57a315597 100644 --- a/common/test/acceptance/tests/lms/test_learner_profile.py +++ b/common/test/acceptance/tests/lms/test_learner_profile.py @@ -44,8 +44,11 @@ class LearnerProfileTestMixin(EventsTestMixin): """ Fill in the public profile fields of a user. """ - profile_page.value_for_dropdown_field('language_proficiencies', 'English', focus_out=True) - profile_page.value_for_dropdown_field('country', 'United Arab Emirates', focus_out=True) + # These value_for_dropdown_field method calls used to include + # focus_out = True, but a change in selenium is focusing out of the + # drop down after selection without any more action needed. + profile_page.value_for_dropdown_field('language_proficiencies', 'English') + profile_page.value_for_dropdown_field('country', 'United Arab Emirates') profile_page.set_value_for_textarea_field('bio', 'Nothing Special') # Waits here for text to appear/save on bio field profile_page.wait_for_ajax() diff --git a/common/test/acceptance/tests/lms/test_lms_gating.py b/common/test/acceptance/tests/lms/test_lms_gating.py index 783b1d6a49..874984aaec 100644 --- a/common/test/acceptance/tests/lms/test_lms_gating.py +++ b/common/test/acceptance/tests/lms/test_lms_gating.py @@ -210,6 +210,7 @@ class GatingTest(UniqueCourseTest): self.course_home_page.visit() self.course_home_page.preview.set_staff_view_mode('Learner') + self.course_home_page.wait_for_page() self.assertEqual(self.course_home_page.outline.num_subsections, 2) self.course_home_page.outline.go_to_section('Test Section 1', 'Test Subsection 1') self.courseware_page.wait_for_page() @@ -218,6 +219,7 @@ class GatingTest(UniqueCourseTest): self.course_home_page.visit() self.course_home_page.preview.set_staff_view_mode_specific_student(self.STUDENT_USERNAME) + self.course_home_page.wait_for_page() self.assertEqual(self.course_home_page.outline.num_subsections, 2) self.course_home_page.outline.go_to_section('Test Section 1', 'Test Subsection 2') self.courseware_page.wait_for_page() diff --git a/common/test/acceptance/tests/video/test_video_module.py b/common/test/acceptance/tests/video/test_video_module.py index 9e35818298..75446c2268 100644 --- a/common/test/acceptance/tests/video/test_video_module.py +++ b/common/test/acceptance/tests/video/test_video_module.py @@ -784,6 +784,7 @@ class YouTubeVideoTest(VideoBaseTest): langs = {'zh_HANS': '在线学习是革', 'zh_HANT': '在線學習是革'} for lang_code, text in langs.items(): + self.video.scroll_to_button("transcript_button") self.assertTrue(self.video.select_language(lang_code)) unicode_text = text.decode('utf-8') self.assertIn(unicode_text, self.video.captions_text) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index b9ac9ff2a8..a62d0cd0fe 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -169,7 +169,7 @@ sqlparse>=0.2.0,<0.3.0 # Used for testing before_after==0.1.3 -bok-choy==0.7.1 +git+https://github.com/edx/bok-choy@215b0bde2b0cd94dec3e9d2620aa8e44f4ee249d#egg=bok-choy==0.7.1 chrono==1.0.2 ddt==0.8.0 @@ -191,7 +191,7 @@ PyContracts==1.7.1 python-subunit==0.0.16 pyquery==1.2.9 radon==1.3.2 -selenium==3.3.1 +selenium==3.11.0 splinter==0.5.4 testtools==0.9.34 testfixtures==4.5.0