Factor out common code between module editing and course overview.
This commit is contained in:
@@ -245,6 +245,11 @@ def confirm_the_prompt(step):
|
||||
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):
|
||||
world.css_click(".CodeMirror", index=index)
|
||||
g = world.css_find("div.CodeMirror.CodeMirror-focused > div > textarea")
|
||||
|
||||
@@ -75,7 +75,7 @@ Feature: Component Adding
|
||||
| Component |
|
||||
| Discussion |
|
||||
And I delete a component
|
||||
Then I see a prompt
|
||||
Then I am shown a prompt
|
||||
|
||||
Scenario: I see a notification on save
|
||||
Given I have opened a new course in studio
|
||||
@@ -84,4 +84,4 @@ Feature: Component Adding
|
||||
| Component |
|
||||
| Discussion |
|
||||
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):
|
||||
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):
|
||||
selector_list = ['a[data-type="{}"]'.format(data_type)]
|
||||
if index != 1:
|
||||
|
||||
@@ -62,4 +62,4 @@ Feature: Course Overview
|
||||
Given I have a course with 1 section
|
||||
When I navigate to the course overview page
|
||||
And I change an assignment's grading status
|
||||
Then I see a notification
|
||||
Then I am shown a notification
|
||||
|
||||
Reference in New Issue
Block a user