diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index b45f92779d..e8dcd755a3 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -61,16 +61,12 @@ def i_select_a_link_to_the_course_outline(step): @step('I am brought to the course outline page$') def i_am_brought_to_course_outline(step): - if world.is_firefox(): - return assert_in('Course Outline', world.css_text('.outline .page-header')) assert_equal(1, len(world.browser.windows)) @step('I am brought back to the course outline in the correct state$') def i_am_brought_back_to_course_outline(step): - if world.is_firefox(): - return step.given('I see the four default edX checklists') # In a previous step, we selected (1, 0) in order to click the 'Edit Course Outline' link. # Make sure the task is still showing as selected (there was a caching bug with the collection). @@ -79,15 +75,11 @@ def i_am_brought_back_to_course_outline(step): @step('I select a link to help page$') def i_select_a_link_to_the_help_page(step): - if world.is_firefox(): - return clickActionLink(2, 0, 'Visit Studio Help') @step('I am brought to the help page in a new window$') def i_am_brought_to_help_page_in_new_window(step): - if world.is_firefox(): - return step.given('I see the four default edX checklists') windows = world.browser.windows assert_equal(2, len(windows)) @@ -117,8 +109,6 @@ def toggleTask(checklist, task): # TODO: figure out a way to do this in phantom and firefox # For now we will mark the scenerios that use this method as skipped def clickActionLink(checklist, task, actionText): - if world.is_firefox(): - return # toggle checklist item to make sure that the link button is showing toggleTask(checklist, task) action_link = world.css_find('#course-checklist' + str(checklist) + ' a')[task] diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index fa6a228763..69d2213eb4 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -71,7 +71,7 @@ def press_the_notification_button(_step, name): error_showing = world.is_css_present('.is-shown.wrapper-notification-error') return confirmation_dismissed or error_showing if world.is_firefox(): - #This is done to explicitly make the changes save on firefox. It will remove focus from the previously focused element + # This is done to explicitly make the changes save on firefox. It will remove focus from the previously focused element world.trigger_event(css, event='focus') world.browser.execute_script("$('{}').click()".format(css)) else: diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 23b9d21850..c31f42ba67 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -116,7 +116,7 @@ def revert_setting_entry(label): def get_setting_entry(label): settings = world.browser.find_by_css('.wrapper-comp-setting') for setting in settings: - if setting.find_by_css('.setting-label')[0].value == label: + if world.css_value('.wrapper-comp-setting .setting-label') == label: return setting return None @@ -124,6 +124,6 @@ def get_setting_entry(label): def get_setting_entry_index(label): settings = world.browser.find_by_css('.wrapper-comp-setting') for index, setting in enumerate(settings): - if setting.find_by_css('.setting-label')[0].value == label: + if world.css_value('.wrapper-comp-setting .setting-label') == label: return index return None diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index 3b8abb4e11..9e30739630 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -47,7 +47,7 @@ def i_can_modify_the_display_name(step): # (to confirm that we don't throw an error because it is of the wrong type). index = world.get_setting_entry_index(DISPLAY_NAME) world.css_fill('.wrapper-comp-setting .setting-input', '3.4', index=index) - if world.browser.driver_name == 'Firefox': + if world.is_firefox(): world.trigger_event('.wrapper-comp-setting .setting-input', index=index) verify_modified_display_name() @@ -140,8 +140,6 @@ def set_the_weight_to_abc(step, bad_weight): @step('if I set the max attempts to "(.*)", it displays initially as "(.*)", and is persisted as "(.*)"') def set_the_max_attempts(step, max_attempts_set, max_attempts_displayed, max_attempts_persisted): #on firefox with selenium, the behaviour is different. eg 2.34 displays as 2.34 and is persisted as 2 - if world.is_firefox(): - return index = world.get_setting_entry_index(MAXIMUM_ATTEMPTS) world.css_fill('.wrapper-comp-setting .setting-input', max_attempts_set, index=index) world.verify_setting_entry(world.get_setting_entry(MAXIMUM_ATTEMPTS), MAXIMUM_ATTEMPTS, max_attempts_displayed, True) diff --git a/cms/djangoapps/contentstore/features/video.feature b/cms/djangoapps/contentstore/features/video.feature index 7ece598268..634bb8a17f 100644 --- a/cms/djangoapps/contentstore/features/video.feature +++ b/cms/djangoapps/contentstore/features/video.feature @@ -23,7 +23,7 @@ Feature: Video Component And I have toggled captions Then when I view the video it does show the captions - #Video Alpha Features will work in Firefox only when Firefox is the active window + # Video Alpha Features will work in Firefox only when Firefox is the active window Scenario: Autoplay is disabled in Studio for Video Alpha Given I have created a Video Alpha component Then when I view the videoalpha it does not have autoplay enabled diff --git a/cms/djangoapps/contentstore/features/video.py b/cms/djangoapps/contentstore/features/video.py index 7c0a1464d3..e27ca28eb7 100644 --- a/cms/djangoapps/contentstore/features/video.py +++ b/cms/djangoapps/contentstore/features/video.py @@ -33,6 +33,7 @@ def hide_or_show_captions(step, shown): # click the button rather than the tooltip, so move the mouse # away to make it disappear. button = world.css_find(button_css) + # mouse_out is not implemented on firefox with selenium if not world.is_firefox: button.mouse_out() world.css_click(button_css) diff --git a/lms/djangoapps/courseware/features/login.feature b/lms/djangoapps/courseware/features/login.feature index d27115bdd9..2b90c56f2d 100644 --- a/lms/djangoapps/courseware/features/login.feature +++ b/lms/djangoapps/courseware/features/login.feature @@ -11,7 +11,7 @@ Feature: Login in as a registered user And I submit my credentials on the login form Then I should see the login error message "This account has not been activated" - #CHROME ONLY, firefox will not redirect properly + # CHROME ONLY, firefox will not redirect properly Scenario: Login to an activated account Given I am an edX user And I am an activated user diff --git a/lms/djangoapps/courseware/features/signup.feature b/lms/djangoapps/courseware/features/signup.feature index 236f02889d..19dfd74f1c 100644 --- a/lms/djangoapps/courseware/features/signup.feature +++ b/lms/djangoapps/courseware/features/signup.feature @@ -3,7 +3,7 @@ Feature: Sign in As a new user I want to signup for a student account - #CHROME ONLY, firefox will not redirect properly + # CHROME ONLY, firefox will not redirect properly Scenario: Sign up from the homepage Given I visit the homepage When I click the link with the text "Register Now"