Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
31635bfb
Commit
31635bfb
authored
Apr 08, 2015
by
Andrew Nicols
Browse files
MDL-49687 enrol: Add behat tests for adding multiple groups
parent
058caae6
Changes
1
Hide whitespace changes
Inline
Side-by-side
enrol/tests/behat/add_to_group.feature
0 → 100644
View file @
31635bfb
@core_enrol
@core_group
Feature
:
Users can be added to multiple groups at once
In order to manage group membership effectively
As a user
I need to add another user to multiple groups
Background
:
Given the following "users" exist
:
|
username
|
firstname
|
lastname
|
email
|
|
teacher1
|
Teacher
|
1
|
teacher1@asd.com
|
|
student1
|
Student
|
1
|
student1@asd.com
|
And the following "courses" exist
:
|
fullname
|
shortname
|
format
|
|
Course
1
|
C1
|
topics
|
And the following "groups" exist
:
|
name
|
course
|
idnumber
|
|
Group
1
|
C1
|
G1
|
|
Group
2
|
C1
|
G2
|
|
Group
3
|
C1
|
G3
|
And the following "course enrolments" exist
:
|
user
|
course
|
role
|
|
teacher1
|
C1
|
editingteacher
|
|
student1
|
C1
|
editingteacher
|
Scenario
:
Adding a user to one group
Given
I log in as
"teacher1"
And
I follow
"Course 1"
And
I navigate to
"Enrolled users"
node in
"Course administration > Users"
And
I click on
"Add user into group"
"link"
in the
"student1"
"table_row"
When
I set the field
"Add user into group"
to
"Group 1"
And
I press
"Save changes"
Then
I should see
"Group 1"
Scenario
:
Adding a user to multiple group
Given
I log in as
"teacher1"
And
I follow
"Course 1"
And
I navigate to
"Enrolled users"
node in
"Course administration > Users"
And
I click on
"Add user into group"
"link"
in the
"student1"
"table_row"
When
I set the field
"Add user into group"
to
"Group 1, Group 2, Group 3"
And
I press
"Save changes"
Then
I should see
"Group 1"
And
I should see
"Group 2"
And
I should see
"Group 3"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment