Commit d632ffe9 by David Baumgold

Make Course Team lettuce tests gender-neutral

Because it bothers me, although I don't expect anyone else to care.
parent a52d0beb
...@@ -3,32 +3,32 @@ Feature: Course Team ...@@ -3,32 +3,32 @@ Feature: Course Team
Scenario: Users can add other users Scenario: Users can add other users
Given I have opened a new course in Studio Given I have opened a new course in Studio
And The user "abcd" exists And the user "alice" exists
And I am viewing the course team settings And I am viewing the course team settings
When I add "abcd" to the course team When I add "alice" to the course team
And "abcd" logs in And "alice" logs in
Then He does see the course on his page Then she does see the course on her page
Scenario: Added users cannot delete or add other users Scenario: Added users cannot delete or add other users
Given I have opened a new course in Studio Given I have opened a new course in Studio
And The user "abcd" exists And the user "bob" exists
And I am viewing the course team settings And I am viewing the course team settings
When I add "abcd" to the course team When I add "bob" to the course team
And "abcd" logs in And "bob" logs in
Then He cannot delete users Then he cannot delete users
And He cannot add users And he cannot add users
Scenario: Users can delete other users Scenario: Users can delete other users
Given I have opened a new course in Studio Given I have opened a new course in Studio
And The user "abcd" exists And the user "carol" exists
And I am viewing the course team settings And I am viewing the course team settings
When I add "abcd" to the course team When I add "carol" to the course team
And I delete "abcd" from the course team And I delete "carol" from the course team
And "abcd" logs in And "carol" logs in
Then He does not see the course on his page Then she does not see the course on her page
Scenario: Users cannot add users that do not exist Scenario: Users cannot add users that do not exist
Given I have opened a new course in Studio Given I have opened a new course in Studio
And I am viewing the course team settings And I am viewing the course team settings
When I add "abcd" to the course team When I add "dennis" to the course team
Then I should see "Could not find user by email address" somewhere on the page Then I should see "Could not find user by email address" somewhere on the page
...@@ -15,7 +15,7 @@ def view_grading_settings(_step): ...@@ -15,7 +15,7 @@ def view_grading_settings(_step):
world.css_click(link_css) world.css_click(link_css)
@step(u'The user "([^"]*)" exists$') @step(u'the user "([^"]*)" exists$')
def create_other_user(_step, name): def create_other_user(_step, name):
create_studio_user(uname=name, password=PASSWORD, email=(name + EMAIL_EXTENSION)) create_studio_user(uname=name, password=PASSWORD, email=(name + EMAIL_EXTENSION))
...@@ -44,8 +44,8 @@ def other_user_login(_step, name): ...@@ -44,8 +44,8 @@ def other_user_login(_step, name):
log_into_studio(uname=name, password=PASSWORD, email=name + EMAIL_EXTENSION) log_into_studio(uname=name, password=PASSWORD, email=name + EMAIL_EXTENSION)
@step(u'He does( not)? see the course on his page') @step(u's?he does( not)? see the course on (his|her) page')
def see_course(_step, doesnt_see_course): def see_course(_step, doesnt_see_course, gender):
class_css = 'span.class-name' class_css = 'span.class-name'
all_courses = world.css_find(class_css) all_courses = world.css_find(class_css)
all_names = [item.html for item in all_courses] all_names = [item.html for item in all_courses]
...@@ -55,13 +55,13 @@ def see_course(_step, doesnt_see_course): ...@@ -55,13 +55,13 @@ def see_course(_step, doesnt_see_course):
assert _COURSE_NAME in all_names assert _COURSE_NAME in all_names
@step(u'He cannot delete users') @step(u's?he cannot delete users')
def cannot_delete(_step): def cannot_delete(_step):
to_delete_css = 'a.remove-user' to_delete_css = 'a.remove-user'
assert world.is_css_not_present(to_delete_css) assert world.is_css_not_present(to_delete_css)
@step(u'He cannot add users') @step(u's?he cannot add users')
def cannot_add(_step): def cannot_add(_step):
add_css = 'a.new-user' add_css = 'a.new-user'
assert world.is_css_not_present(add_css) assert world.is_css_not_present(add_css)
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