Commit fb0fcc31 by Peter Fogg

Factor out common code between module editing and course overview.

parent 75edc657
...@@ -245,6 +245,11 @@ def confirm_the_prompt(step): ...@@ -245,6 +245,11 @@ def confirm_the_prompt(step):
world.css_click(prompt_css) world.css_click(prompt_css)
@step(u'I am shown a (.*)$')
def i_am_shown_a_notification(step, notification_type):
assert world.is_css_present('.wrapper-%s' % notification_type)
def type_in_codemirror(index, text): def type_in_codemirror(index, text):
world.css_click(".CodeMirror", index=index) world.css_click(".CodeMirror", index=index)
g = world.css_find("div.CodeMirror.CodeMirror-focused > div > textarea") g = world.css_find("div.CodeMirror.CodeMirror-focused > div > textarea")
......
...@@ -75,7 +75,7 @@ Feature: Component Adding ...@@ -75,7 +75,7 @@ Feature: Component Adding
| Component | | Component |
| Discussion | | Discussion |
And I delete a component And I delete a component
Then I see a prompt Then I am shown a prompt
Scenario: I see a notification on save Scenario: I see a notification on save
Given I have opened a new course in studio Given I have opened a new course in studio
...@@ -84,4 +84,4 @@ Feature: Component Adding ...@@ -84,4 +84,4 @@ Feature: Component Adding
| Component | | Component |
| Discussion | | Discussion |
And I edit and save a component And I edit and save a component
Then I see a notification Then I am shown a notification
...@@ -52,11 +52,6 @@ def edit_and_save_component(step): ...@@ -52,11 +52,6 @@ def edit_and_save_component(step):
world.css_click('.save-button') world.css_click('.save-button')
@step(u'I see a (.*)$')
def i_see_a_notification(step, notification_type):
assert world.is_css_present('.wrapper-%s' % notification_type)
def step_selector_list(data_type, path, index=1): def step_selector_list(data_type, path, index=1):
selector_list = ['a[data-type="{}"]'.format(data_type)] selector_list = ['a[data-type="{}"]'.format(data_type)]
if index != 1: if index != 1:
......
...@@ -62,4 +62,4 @@ Feature: Course Overview ...@@ -62,4 +62,4 @@ Feature: Course Overview
Given I have a course with 1 section Given I have a course with 1 section
When I navigate to the course overview page When I navigate to the course overview page
And I change an assignment's grading status And I change an assignment's grading status
Then I see a notification Then I am shown a notification
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment