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
Scenario: Users can add other users
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
When I add "abcd" to the course team
And "abcd" logs in
Then He does see the course on his page
When I add "alice" to the course team
And "alice" logs in
Then she does see the course on her page
Scenario: Added users cannot delete or add other users
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
When I add "abcd" to the course team
And "abcd" logs in
Then He cannot delete users
And He cannot add users
When I add "bob" to the course team
And "bob" logs in
Then he cannot delete users
And he cannot add users
Scenario: Users can delete other users
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
When I add "abcd" to the course team
And I delete "abcd" from the course team
And "abcd" logs in
Then He does not see the course on his page
When I add "carol" to the course team
And I delete "carol" from the course team
And "carol" logs in
Then she does not see the course on her page
Scenario: Users cannot add users that do not exist
Given I have opened a new course in Studio
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
......@@ -15,7 +15,7 @@ def view_grading_settings(_step):
world.css_click(link_css)
@step(u'The user "([^"]*)" exists$')
@step(u'the user "([^"]*)" exists$')
def create_other_user(_step, name):
create_studio_user(uname=name, password=PASSWORD, email=(name + EMAIL_EXTENSION))
......@@ -44,8 +44,8 @@ def other_user_login(_step, name):
log_into_studio(uname=name, password=PASSWORD, email=name + EMAIL_EXTENSION)
@step(u'He does( not)? see the course on his page')
def see_course(_step, doesnt_see_course):
@step(u's?he does( not)? see the course on (his|her) page')
def see_course(_step, doesnt_see_course, gender):
class_css = 'span.class-name'
all_courses = world.css_find(class_css)
all_names = [item.html for item in all_courses]
......@@ -55,13 +55,13 @@ def see_course(_step, doesnt_see_course):
assert _COURSE_NAME in all_names
@step(u'He cannot delete users')
@step(u's?he cannot delete users')
def cannot_delete(_step):
to_delete_css = 'a.remove-user'
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):
add_css = 'a.new-user'
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