Skip to content
GitLab
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
221210e9
Commit
221210e9
authored
Apr 08, 2015
by
Damyon Wiese
Committed by
Adrian Greeve
Apr 10, 2015
Browse files
MDL-49412 Behat: Fix behat tests for all of @mod
This is after the navigation changes for 2.9. Part of MDL-45774.
parent
3a8b9b65
Changes
17
Hide whitespace changes
Inline
Side-by-side
mod/assign/tests/behat/outcome_grading.feature
View file @
221210e9
...
...
@@ -34,7 +34,7 @@ Feature: Outcome grading
|
Short
name
|
OT
|
|
Scale
|
Test
Scale
|
And
I press
"Save changes"
And
I am on homepage
And
I am on
site
homepage
And
I follow
"Course 1"
And
I follow
"Outcomes"
And
I set the field
"Available standard outcomes"
to
"Outcome Test"
...
...
@@ -87,7 +87,7 @@ Feature: Outcome grading
And
I follow
"Groups"
And
I add
"Student 0 (student0@asd.com)"
user to
"Group 1"
group members
And
I add
"Student 1 (student1@asd.com)"
user to
"Group 1"
group members
And
I am on homepage
And
I am on
site
homepage
And
I follow
"Course 1"
And
I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with
:
...
...
mod/assign/tests/behat/quickgrading.feature
View file @
221210e9
...
...
@@ -18,6 +18,7 @@ Feature: In an assignment, teachers grade multiple students on one page
|
teacher1
|
C1
|
editingteacher
|
|
student1
|
C1
|
student
|
When
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with
:
...
...
@@ -34,6 +35,7 @@ Feature: In an assignment, teachers grade multiple students on one page
And
I
press
"Save
changes"
And
I log out
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I follow
"Test assignment name"
And
I follow
"View/grade all submissions"
...
...
@@ -126,8 +128,8 @@ Feature: In an assignment, teachers grade multiple students on one page
And
I follow
"Test assignment name"
And
I should see
"I'm the teacher first feedback"
And
I should see
"60.0"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I follow
"Grades"
And
I should see
"1337"
And
I log out
And
I log in as
"student2"
...
...
@@ -135,8 +137,8 @@ Feature: In an assignment, teachers grade multiple students on one page
And
I follow
"Test assignment name"
And
I should not see
"I'm the teacher first feedback"
And
I should not see
"60.0"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I follow
"Grades"
And
I should not see
"1337"
And
I log out
And
I log in as
"teacher1"
...
...
@@ -165,8 +167,8 @@ Feature: In an assignment, teachers grade multiple students on one page
And
I follow
"Test assignment name"
And
I should see
"I'm the teacher first feedback"
And
I should see
"60.0"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I follow
"Grades"
And
I should see
"1337"
And
I log out
And
I log in as
"student2"
...
...
@@ -174,6 +176,6 @@ Feature: In an assignment, teachers grade multiple students on one page
And
I follow
"Test assignment name"
And
I should not see
"I'm the teacher first feedback"
And
I should not see
"60.0"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I follow
"Grades"
And
I should not see
"1337"
mod/book/tests/behat/log_entries.feature
View file @
221210e9
...
...
@@ -10,6 +10,7 @@ Feature: In a book, verify log entries
|
fullname
|
shortname
|
category
|
groupmode
|
|
Course
1
|
C1
|
0
|
1
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
When I add a "Book" to section "1" and I fill the form with
:
...
...
@@ -63,4 +64,4 @@ Feature: In a book, verify log entries
And
I click on
"Chapter created"
"link"
in the
"#report_log_r9_c5"
"css_element"
And
I switch to
"action"
window
And
I should see
"1 First chapter edited"
in the
".book_content"
"css_element"
And
I switch to the main window
\ No newline at end of file
And
I switch to the main window
mod/choice/tests/behat/block_editing.feature
View file @
221210e9
...
...
@@ -11,6 +11,7 @@ Feature: Add choice activity
|
fullname
|
shortname
|
category
|
|
Course
1
|
C1
|
0
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
And I add a "Choice" to section "1" and I fill the form with
:
...
...
mod/choice/tests/behat/multiple_options.feature
View file @
221210e9
...
...
@@ -77,4 +77,4 @@ Feature: Multiple option choice response
And
I should see
"Option 3"
And
the
"#choice_1"
"css_element"
should be disabled
And
the
"#choice_2"
"css_element"
should be disabled
And
the
"#choice_3"
"css_element"
should be enabled
\ No newline at end of file
And
the
"#choice_3"
"css_element"
should be enabled
mod/choice/tests/behat/my_home.feature
View file @
221210e9
...
...
@@ -2,7 +2,7 @@
Feature
:
Test the display of the choice module on my home
In order to know my status in a choice activity
As a user
I need to see it in My
home
.
I need to see it in My
dashboard
.
Background
:
Given the following "users" exist
:
...
...
@@ -39,7 +39,7 @@ Feature: Test the display of the choice module on my home
@javascript
Scenario
:
View my home as a student before answering the choice
Given
I log in as
"student1"
When
I click on
"
My home
"
"link"
in the
"Navigation"
"block"
When
I click on
"
Dashboard
"
"link"
in the
"Navigation"
"block"
Then
I should see
"You have Choices that need attention"
And
I click on
".collapsibleregioncaption"
"css_element"
And
I should see
"Not answered yet"
...
...
@@ -52,7 +52,7 @@ Feature: Test the display of the choice module on my home
And I should see "Your selection
:
Option
1"
And
I should see
"Your choice has been saved"
And
"Save my choice"
"button"
should not exist
When
I click on
"
My home
"
"link"
in the
"Navigation"
"block"
When
I click on
"
Dashboard
"
"link"
in the
"Navigation"
"block"
Then
I should not see
"You have Choices that need attention"
And
I log out
...
...
@@ -66,8 +66,8 @@ Feature: Test the display of the choice module on my home
And
"Save my choice"
"button"
should not exist
And
I log out
When
I log in as
"teacher1"
And
I click on
"
My home
"
"link"
in the
"Navigation"
"block"
And
I click on
"
Dashboard
"
"link"
in the
"Navigation"
"block"
Then
I should see
"You have Choices that need attention"
And
I click on
".collapsibleregioncaption"
"css_element"
And
I should see
"View 1 responses"
And
I log out
\ No newline at end of file
And
I log out
mod/forum/tests/behat/discussion_display.feature
View file @
221210e9
...
...
@@ -15,6 +15,7 @@ Feature: Students can choose from 4 discussion display options and their choice
|
user
|
course
|
role
|
|
student1
|
C1
|
student
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with
:
...
...
mod/forum/tests/behat/discussion_navigation.feature
View file @
221210e9
...
...
@@ -17,6 +17,7 @@ Feature: A user can navigate to previous and next discussions
|
student1
|
C1
|
student
|
|
student2
|
C1
|
student
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I navigate to
"Groups"
node in
"Users"
And
I press
"Create group"
...
...
@@ -29,7 +30,7 @@ Feature: A user can navigate to previous and next discussions
And
I
press
"Save
changes"
And
I add
"Student 1"
user to
"Group 1"
group members
And
I add
"Student 2"
user to
"Group 2"
group members
And
I am on homepage
And
I am on
site
homepage
And
I follow
"Course 1"
And
I turn editing mode on
...
...
mod/forum/tests/behat/discussion_subscriptions.feature
View file @
221210e9
...
...
@@ -15,6 +15,7 @@ Feature: A user can control their own subscription preferences for a discussion
|
user
|
course
|
role
|
|
student1
|
C1
|
student
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
...
...
@@ -134,6 +135,7 @@ Feature: A user can control their own subscription preferences for a discussion
And
"You are not subscribed to this discussion. Click to subscribe."
"link"
should exist in the
"Test post subject two"
"table_row"
And
I log out
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I follow
"Test forum name"
And
I click on
"Edit settings"
"link"
in the
"Administration"
"block"
...
...
@@ -179,6 +181,7 @@ Feature: A user can control their own subscription preferences for a discussion
And
"You are not subscribed to this discussion. Click to subscribe."
"link"
should exist in the
"Test post subject two"
"table_row"
And
I log out
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I follow
"Test forum name"
And
I click on
"Edit settings"
"link"
in the
"Administration"
"block"
...
...
@@ -271,7 +274,7 @@ Feature: A user can control their own subscription preferences for a discussion
And
the field
"Discussion subscription"
matches value
"I don't want to be notified of new posts in this discussion"
Scenario
:
A
guest should not be able to subscribe to a discussion
Given
I
click on
"Home"
"link"
in the
"Navigation"
"block"
Given
I
am on site homepage
And I add a "Forum" to section "1" and I fill the form with
:
|
Forum
name
|
Test
forum
name
|
|
Forum
type
|
Standard
forum
for
general
use
|
...
...
@@ -289,7 +292,7 @@ Feature: A user can control their own subscription preferences for a discussion
And
"You are subscribed to this discussion. Click to unsubscribe."
"link"
should not exist
Scenario
:
A
user who is not logged in should not be able to subscribe to a discussion
Given
I
click on
"Home"
"link"
in the
"Navigation"
"block"
Given
I
am on site homepage
And I add a "Forum" to section "1" and I fill the form with
:
|
Forum
name
|
Test
forum
name
|
|
Forum
type
|
Standard
forum
for
general
use
|
...
...
mod/forum/tests/behat/edit_post_student.feature
View file @
221210e9
...
...
@@ -20,7 +20,7 @@ Feature: Students can edit or delete their forum posts within a set time limit
And
I follow
"Site policies"
And
I set the field
"Maximum time to edit posts"
to
"1 minutes"
And
I press
"Save changes"
And
I am on homepage
And
I am on
site
homepage
And
I follow
"Course 1"
And
I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with
:
...
...
mod/forum/tests/behat/forum_subscriptions.feature
View file @
221210e9
...
...
@@ -15,6 +15,7 @@ Feature: A user can control their own subscription preferences for a forum
|
user
|
course
|
role
|
|
student1
|
C1
|
student
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
...
...
mod/forum/tests/behat/forum_subscriptions_default.feature
View file @
221210e9
...
...
@@ -17,6 +17,7 @@ Feature: A user can control their default discussion subscription settings
|
student1
|
C1
|
student
|
|
student2
|
C1
|
student
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
...
...
mod/forum/tests/behat/my_forum_posts.feature
View file @
221210e9
@mod
@mod_forum
@mod
@mod_forum
@javascript
Feature
:
A user can view their posts and discussions
In order to ensure a user can view their posts and discussions
As a student
...
...
@@ -31,9 +31,11 @@ Feature: A user can view their posts and discussions
|
Message
|
How
awesome
is
this
forum
discussion?
|
And I reply "Forum discussion 1" post from "Test forum name" forum with
:
|
Message
|
Actually,
I've
seen
better.
|
When
I
navigate
to
"Posts"
node
in
"My
profile
>
Forum
posts"
When
I
follow
"My
profile"
in
the
user
menu
And
I follow
"My forum posts"
Then
I should see
"How awesome is this forum discussion?"
And
I should see
"Actually, I've seen better."
And
I navigate to
"Discussions"
node in
"My profile > Forum posts"
And
I follow
"My profile"
in the user menu
And
I follow
"My forum discussions"
And
I should see
"How awesome is this forum discussion?"
And
I should not see
"Actually, I've seen better."
mod/forum/tests/behat/separate_group_single_group_discussions.feature
View file @
221210e9
...
...
@@ -34,6 +34,7 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
|
G1
|
G1G2
|
|
G2
|
G2G1
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with
:
...
...
mod/forum/tests/behat/track_read_posts.feature
View file @
221210e9
...
...
@@ -17,6 +17,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
student1
|
C1
|
student
|
|
student2
|
C1
|
student
|
And
I log in as
"admin"
And
I am on site homepage
And
I follow
"Course 1"
And
I turn editing mode on
...
...
@@ -84,7 +85,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario
:
Tracking forum posts forced with user tracking on
Given the following config values are set as admin
:
|
forum_allowforcedreadtracking
|
1
|
And
I
follow
"Home"
And
I
am
on
site
homepage
And
I follow
"Course 1"
Given I add a "Forum" to section "1" and I fill the form with
:
|
Forum
name
|
Test
forum
name
|
...
...
@@ -108,7 +109,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario
:
Tracking forum posts forced with user tracking off
Given the following config values are set as admin
:
|
forum_allowforcedreadtracking
|
1
|
And
I
follow
"Home"
And
I
am
on
site
homepage
And
I follow
"Course 1"
Given I add a "Forum" to section "1" and I fill the form with
:
|
Forum
name
|
Test
forum
name
|
...
...
@@ -132,7 +133,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario
:
Tracking forum posts forced (with force disabled) with user tracking on
Given the following config values are set as admin
:
|
forum_allowforcedreadtracking
|
1
|
And
I
follow
"Home"
And
I
am
on
site
homepage
And
I follow
"Course 1"
Given I add a "Forum" to section "1" and I fill the form with
:
|
Forum
name
|
Test
forum
name
|
...
...
@@ -164,7 +165,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario
:
Tracking forum posts forced (with force disabled) with user tracking off
Given the following config values are set as admin
:
|
forum_allowforcedreadtracking
|
1
|
And
I
follow
"Home"
And
I
am
on
site
homepage
And
I follow
"Course 1"
Given I add a "Forum" to section "1" and I fill the form with
:
|
Forum
name
|
Test
forum
name
|
...
...
mod/lesson/tests/behat/lesson_practice.feature
View file @
221210e9
...
...
@@ -51,7 +51,8 @@ Feature: Practice mode in a lesson activity
|
True
|
1
|
And
I
press
"Submit"
Then
I should see
"View grades"
And
I navigate to
"Grades"
node in
"Course administration"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I should see
"Non-practice lesson"
@javascript
...
...
@@ -71,7 +72,8 @@ Feature: Practice mode in a lesson activity
|
True
|
1
|
And
I
press
"Submit"
Then
I should not see
"View grades"
And
I navigate to
"Grades"
node in
"Course administration"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I should not see
"Practice lesson"
@javascript
...
...
@@ -92,5 +94,6 @@ Feature: Practice mode in a lesson activity
|
True
|
1
|
And
I
press
"Submit"
Then
I should not see
"View grades"
And
I navigate to
"Grades"
node in
"Course administration"
And
I follow
"My grades"
in the user menu
And
I follow
"Course 1"
And
I should not see
"Practice lesson with scale"
mod/lesson/tests/behat/questions_images.feature
View file @
221210e9
...
...
@@ -17,7 +17,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
|
teacher1
|
C1
|
editingteacher
|
|
student1
|
C1
|
student
|
And
I log in as
"teacher1"
And
I
navigate to
"My private files"
node in
"My profile
"
And
I
follow
"Manage my private files
"
And
I upload
"mod/lesson/tests/fixtures/moodle_logo.jpg"
file to
"Files"
filemanager
And
I click on
"Save changes"
"button"
When
I am on homepage
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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