From 7e67ee378a6a6c5ec1cb512df65872b9c81b7d9c Mon Sep 17 00:00:00 2001 From: JonahStanley Date: Mon, 5 Aug 2013 11:11:13 -0400 Subject: [PATCH] Checklist links will not appear using a firefox webdriver (will work manually) --- cms/djangoapps/contentstore/features/checklists.feature | 2 ++ cms/djangoapps/contentstore/features/checklists.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/cms/djangoapps/contentstore/features/checklists.feature b/cms/djangoapps/contentstore/features/checklists.feature index 10db23c4fa..4a0ed611d6 100644 --- a/cms/djangoapps/contentstore/features/checklists.feature +++ b/cms/djangoapps/contentstore/features/checklists.feature @@ -10,6 +10,7 @@ Feature: Course checklists Then I can check and uncheck tasks in a checklist And They are correctly selected after reloading the page + #CHROME ONLY Scenario: A task can link to a location within Studio Given I have opened Checklists When I select a link to the course outline @@ -17,6 +18,7 @@ Feature: Course checklists And I press the browser back button Then I am brought back to the course outline in the correct state + #CHROME ONLY Scenario: A task can link to a location outside Studio Given I have opened Checklists When I select a link to help page diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index e8dcd755a3..3fc709f700 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -67,6 +67,8 @@ def i_am_brought_to_course_outline(step): @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). @@ -75,11 +77,15 @@ 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)) @@ -109,6 +115,8 @@ 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]