mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
MDL-64820 forum: fix behat tests
This commit is contained in:
parent
7661ccddfd
commit
858179b024
@ -4,122 +4,124 @@ Feature: Change number of discussions displayed
|
||||
As a teacher
|
||||
I need to edit the course and change the number of sections displayed.
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category | format |
|
||||
| Course 1 | C1 | 0 | social |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 10 |
|
||||
| Message | This is forum post ten |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 9 |
|
||||
| Message | This is forum post nine |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 8 |
|
||||
| Message | This is forum post eight |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 7 |
|
||||
| Message | This is forum post seven |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 6 |
|
||||
| Message | This is forum post six |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 5 |
|
||||
| Message | This is forum post five |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 4 |
|
||||
| Message | This is forum post four |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 3 |
|
||||
| Message | This is forum post three |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 2 |
|
||||
| Message | This is forum post two |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
And I wait "1" seconds
|
||||
And I press "Add a new discussion topic"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum Post 1 |
|
||||
| Message | This is forum post one |
|
||||
And I press "Post to forum"
|
||||
And I wait to be redirected
|
||||
And I am on "Course 1" course homepage
|
||||
|
||||
Scenario: When number of discussions is decreased fewer discussions appear
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | 5 |
|
||||
When I press "Save and display"
|
||||
Then I should see "This is forum post one"
|
||||
And I should see "This is forum post five"
|
||||
And I should not see "This is forum post six"
|
||||
|
||||
Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | -1 |
|
||||
When I press "Save and display"
|
||||
Then I should see "This is forum post one"
|
||||
And I should not see "This is forum post two"
|
||||
And I should not see "This is forum post ten"
|
||||
|
||||
Scenario: When number of discussions is increased more discussions appear
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | 9 |
|
||||
When I press "Save and display"
|
||||
Then I should see "This is forum post one"
|
||||
And I should see "This is forum post five"
|
||||
And I should see "This is forum post nine"
|
||||
And I should not see "This is forum post ten"
|
||||
# Uncomment these tests when the forum_print_latest_discussions function is
|
||||
# deprecated in MDL-65082.
|
||||
# Background:
|
||||
# Given the following "users" exist:
|
||||
# | username | firstname | lastname | email |
|
||||
# | teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
# And the following "courses" exist:
|
||||
# | fullname | shortname | category | format |
|
||||
# | Course 1 | C1 | 0 | social |
|
||||
# And the following "course enrolments" exist:
|
||||
# | user | course | role |
|
||||
# | teacher1 | C1 | editingteacher |
|
||||
# And I log in as "teacher1"
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 10 |
|
||||
# | Message | This is forum post ten |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 9 |
|
||||
# | Message | This is forum post nine |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 8 |
|
||||
# | Message | This is forum post eight |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 7 |
|
||||
# | Message | This is forum post seven |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 6 |
|
||||
# | Message | This is forum post six |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 5 |
|
||||
# | Message | This is forum post five |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 4 |
|
||||
# | Message | This is forum post four |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 3 |
|
||||
# | Message | This is forum post three |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 2 |
|
||||
# | Message | This is forum post two |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
# And I wait "1" seconds
|
||||
# And I press "Add a new discussion topic"
|
||||
# And I set the following fields to these values:
|
||||
# | Subject | Forum Post 1 |
|
||||
# | Message | This is forum post one |
|
||||
# And I press "Post to forum"
|
||||
# And I wait to be redirected
|
||||
# And I am on "Course 1" course homepage
|
||||
#
|
||||
# Scenario: When number of discussions is decreased fewer discussions appear
|
||||
# Given I navigate to "Edit settings" in current page administration
|
||||
# And I set the following fields to these values:
|
||||
# | numdiscussions | 5 |
|
||||
# When I press "Save and display"
|
||||
# Then I should see "This is forum post one"
|
||||
# And I should see "This is forum post five"
|
||||
# And I should not see "This is forum post six"
|
||||
#
|
||||
# Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
|
||||
# Given I navigate to "Edit settings" in current page administration
|
||||
# And I set the following fields to these values:
|
||||
# | numdiscussions | -1 |
|
||||
# When I press "Save and display"
|
||||
# Then I should see "This is forum post one"
|
||||
# And I should not see "This is forum post two"
|
||||
# And I should not see "This is forum post ten"
|
||||
#
|
||||
# Scenario: When number of discussions is increased more discussions appear
|
||||
# Given I navigate to "Edit settings" in current page administration
|
||||
# And I set the following fields to these values:
|
||||
# | numdiscussions | 9 |
|
||||
# When I press "Save and display"
|
||||
# Then I should see "This is forum post one"
|
||||
# And I should see "This is forum post five"
|
||||
# And I should see "This is forum post nine"
|
||||
# And I should not see "This is forum post ten"
|
||||
|
@ -22,14 +22,14 @@ Feature: Managers can create courses
|
||||
And I add the "Latest announcements" block
|
||||
Then "Latest announcements" "block" should exist
|
||||
And I follow "Announcements"
|
||||
And "Add a new topic" "button" should exist
|
||||
And "Add a new topic" "link" should exist
|
||||
And "Subscription mode > Forced subscription" "link" should not exist in current page administration
|
||||
And "Subscription mode > Forced subscription" "text" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Announcements"
|
||||
And "Add a new topic" "button" should not exist
|
||||
And "Add a new topic" "link" should not exist
|
||||
And "Forced subscription" "text" should exist in current page administration
|
||||
|
||||
Scenario: Create a course from the management interface and return to it
|
||||
|
@ -92,7 +92,7 @@ Feature: Using the activity grade form element
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
And I press "Add a new discussion topic"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Discussion subject |
|
||||
| Message | Discussion message |
|
||||
@ -170,7 +170,7 @@ Feature: Using the activity grade form element
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
And I press "Add a new discussion topic"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Discussion subject |
|
||||
| Message | Discussion message |
|
||||
|
@ -40,55 +40,55 @@ Feature: Context freezing apply to child contexts
|
||||
Given I log in as "admin"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I follow "faa1"
|
||||
And "Add a new discussion topic" "button" should exist
|
||||
And "Add a new discussion topic" "link" should exist
|
||||
When I follow "Freeze this context"
|
||||
And I click on "Continue" "button"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseaa2" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseb" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "teacher"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseaa2" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseb" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "fb"
|
||||
And "Add a new discussion topic" "button" should exist
|
||||
And "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseaa2" course homepage
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseb" course homepage
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
Scenario: Freeze course should freeze all children
|
||||
Given I log in as "admin"
|
||||
@ -97,54 +97,54 @@ Feature: Context freezing apply to child contexts
|
||||
When I follow "Freeze this context"
|
||||
And I click on "Continue" "button"
|
||||
Then I should not see "Turn editing on"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
And "Unfreeze this context" "link" should exist in current page administration
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
And "Unfreeze this context" "link" should not exist in current page administration
|
||||
When I am on "courseaa2" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseb" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "teacher"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa2" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseb" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa2" course homepage
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
When I am on "courseb" course homepage
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
Scenario: Freeze course category should freeze all children
|
||||
Given I log in as "admin"
|
||||
@ -153,53 +153,53 @@ Feature: Context freezing apply to child contexts
|
||||
And I click on "Continue" "button"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I should not see "Turn editing on"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
And "Unfreeze this context" "link" should not exist in current page administration
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
And "Unfreeze this context" "link" should not exist in current page administration
|
||||
When I am on "courseaa2" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
And "Unfreeze this context" "link" should not exist in current page administration
|
||||
When I am on "courseb" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "teacher"
|
||||
And I am on "courseaa1" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa2" course homepage
|
||||
Then I should not see "Turn editing on"
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseb" course homepage
|
||||
Then I should see "Turn editing on"
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "courseaa1" course homepage
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
When I follow "faa1b"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa2" course homepage
|
||||
When I follow "faa2"
|
||||
Then "Add a new discussion topic" "button" should not exist
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseb" course homepage
|
||||
When I follow "fb"
|
||||
Then "Add a new discussion topic" "button" should exist
|
||||
Then "Add a new discussion topic" "link" should exist
|
||||
|
@ -68,12 +68,12 @@ Feature: Students can choose from 4 discussion display options and their choice
|
||||
And I follow "Discussion 1"
|
||||
When I select "Display replies in threaded form" from the "mode" singleselect
|
||||
Then I should see "Discussion contents 1, first message"
|
||||
And I should see "Reply 1 to discussion 1" in the "span.forumthread" "css_element"
|
||||
And I should see "Reply 1 to discussion 1" in the "div.forumthread" "css_element"
|
||||
And I follow "Test forum name"
|
||||
And I follow "Discussion 2"
|
||||
And the field "Display mode" matches value "Display replies in threaded form"
|
||||
And I should see "Discussion contents 2, first message"
|
||||
And I should see "Reply 1 to discussion 2" in the "span.forumthread" "css_element"
|
||||
And I should see "Reply 1 to discussion 2" in the "div.forumthread" "css_element"
|
||||
|
||||
Scenario: Display replies in nested form
|
||||
Given I follow "Test forum name"
|
||||
|
@ -34,7 +34,7 @@ Feature: Edited forum posts handle tags correctly
|
||||
| Subject | Student post subject |
|
||||
| Message | Student post message |
|
||||
| Tags | Tag1 |
|
||||
Then I should see "Tag1" in the ".forum-tags" "css_element"
|
||||
Then I should see "Tag1" in the ".tag_list" "css_element"
|
||||
And I click on "Edit" "link" in the "//div[@aria-label='Student post subject by Student 1']" "xpath_element"
|
||||
Then I should see "Tag1" in the ".form-autocomplete-selection" "css_element"
|
||||
|
||||
@ -50,7 +50,7 @@ Feature: Edited forum posts handle tags correctly
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum"
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And I expand all fieldsets
|
||||
And I open the autocomplete suggestions list
|
||||
And I should see "OT1" in the ".form-autocomplete-suggestions" "css_element"
|
||||
@ -60,9 +60,9 @@ Feature: Edited forum posts handle tags correctly
|
||||
| Subject | Student post subject |
|
||||
| Message | Student post message |
|
||||
| Tags | OT1, OT3 |
|
||||
Then I should see "OT1" in the ".forum-tags" "css_element"
|
||||
And I should see "OT3" in the ".forum-tags" "css_element"
|
||||
And I should not see "OT2" in the ".forum-tags" "css_element"
|
||||
Then I should see "OT1" in the ".tag_list" "css_element"
|
||||
And I should see "OT3" in the ".tag_list" "css_element"
|
||||
And I should not see "OT2" in the ".tag_list" "css_element"
|
||||
And I click on "Edit" "link" in the "//div[@aria-label='Student post subject by Teacher 1']" "xpath_element"
|
||||
And I should see "OT1" in the ".form-autocomplete-selection" "css_element"
|
||||
And I should see "OT3" in the ".form-autocomplete-selection" "css_element"
|
||||
|
@ -29,13 +29,13 @@ Feature: A user can control their default discussion subscription settings
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I press "Add a new discussion topic"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
And I press "Add a new discussion topic"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist
|
||||
|
||||
Scenario: Replying to an existing discussion in an optional forum follows user preferences
|
||||
@ -72,13 +72,13 @@ Feature: A user can control their default discussion subscription settings
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I press "Add a new discussion topic"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
And I press "Add a new discussion topic"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
|
||||
|
||||
Scenario: Replying to an existing discussion in an automatic forum follows forum subscription
|
||||
|
@ -35,7 +35,7 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us
|
||||
And I follow "Standard forum name"
|
||||
And I should not see "Group A"
|
||||
And I should not see "Group B"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
And I should not see "Group" in the "form" "css_element"
|
||||
And I set the following fields to these values:
|
||||
@ -51,7 +51,7 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us
|
||||
And I follow "Standard forum name"
|
||||
And I should not see "Group A"
|
||||
And I should not see "Group B"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
And I should not see "Group" in the "form" "css_element"
|
||||
And I set the following fields to these values:
|
||||
|
@ -23,7 +23,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher -> All participants |
|
||||
@ -36,7 +36,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Separate forum"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher -> All participants |
|
||||
@ -49,7 +49,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Visible forum"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher -> All participants |
|
||||
@ -62,7 +62,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Student -> All participants |
|
||||
|
@ -112,7 +112,7 @@ Feature: A user with access to multiple groups should be able to post a copy of
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "No group forum"
|
||||
And I press "Add a new discussion topic"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
|
||||
Scenario: Posts to all groups that have groupings should only display within the grouping and not to other groups
|
||||
|
@ -56,7 +56,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then the "Group" select box should contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
@ -68,7 +68,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
And I select "Group A" from the "Separate groups" singleselect
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher 1 -> Group B |
|
||||
@ -98,7 +98,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
And I select "Group A" from the "Separate groups" singleselect
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher 1 -> Group C |
|
||||
@ -127,7 +127,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher 1 -> Post to all |
|
||||
| Message | Teacher 1 -> Post to all |
|
||||
@ -155,7 +155,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
Then I should see "Group A"
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And I should see "Group A"
|
||||
And I should not see "Group B"
|
||||
And I should not see "Group C"
|
||||
@ -173,7 +173,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
And I select "Group A" from the "Separate groups" singleselect
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
@ -193,7 +193,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
And I should not see "Student -> B"
|
||||
# Now try posting in Group A (starting at Group B)
|
||||
And I select "Group B" from the "Separate groups" singleselect
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
@ -220,7 +220,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
Given I log in as "noneditor1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
@ -234,7 +234,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
||||
Given I log in as "noneditor1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
|
@ -58,13 +58,13 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Multiple groups forum"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then the "Group" select box should contain "All participants"
|
||||
And the "Group" select box should contain "G1G1"
|
||||
And the "Group" select box should contain "G1G2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Single groups forum"
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And the "Group" select box should contain "All participants"
|
||||
And the "Group" select box should contain "G2G1"
|
||||
And I should not see "Post a copy to all groups"
|
||||
@ -73,12 +73,12 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
|
||||
Given I log in as "teacher2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Multiple groups forum"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "G1G1"
|
||||
And the "Group" select box should contain "G1G2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Single groups forum"
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And I should see "G2G1"
|
||||
And "Group" "select" should not exist
|
||||
|
@ -47,7 +47,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then the "Group" select box should contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
@ -59,7 +59,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
And I select "Group A" from the "Visible groups" singleselect
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher 1 -> Group B |
|
||||
@ -89,7 +89,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
And I select "Group A" from the "Visible groups" singleselect
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
Then I should see "Post a copy to all groups"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher 1 -> Group C |
|
||||
@ -118,7 +118,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
When I click on "Add a new discussion topic" "button"
|
||||
When I click on "Add a new discussion topic" "link"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Teacher 1 -> Post to all |
|
||||
| Message | Teacher 1 -> Post to all |
|
||||
@ -155,7 +155,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
Then I should see "Group A"
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And I should see "Group A"
|
||||
And I should not see "Group B"
|
||||
And I should not see "Group C"
|
||||
@ -173,7 +173,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
And I select "Group A" from the "Visible groups" singleselect
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
@ -193,7 +193,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
||||
And I should not see "Student -> B"
|
||||
# Now try posting in Group A (starting at Group B)
|
||||
And I select "Group B" from the "Visible groups" singleselect
|
||||
And I click on "Add a new discussion topic" "button"
|
||||
And I click on "Add a new discussion topic" "link"
|
||||
And the "Group" select box should not contain "All participants"
|
||||
And the "Group" select box should contain "Group A"
|
||||
And the "Group" select box should contain "Group B"
|
||||
|
Loading…
x
Reference in New Issue
Block a user