Merge branch 'MDL-75912-master' of https://github.com/andelacruz/moodle

This commit is contained in:
Andrew Nicols 2023-02-02 09:49:05 +08:00
commit 929e5b4552
9 changed files with 17 additions and 56 deletions

View file

@ -30,10 +30,9 @@ Feature: Verify that all form fields values can be get and set
| student2 | G2 | | student2 | G2 |
| student3 | G2 | | student3 | G2 |
And the following "activities" exist: And the following "activities" exist:
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible | | activity | course | idnumber | name | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 | | wiki | C1 | wiki1 | Test this one | Test this one | collaborative | 0 |
And I log in as "admin" And I am on the "Course 1" "reset" page logged in as admin
And I am on the "Course 1" "reset" page
# Select (multi-select) - Checking "the select box should contain". # Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets And I expand all fieldsets
And the "Unenrol users" select box should contain "No roles" And the "Unenrol users" select box should contain "No roles"
@ -60,16 +59,14 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" ticked. # Checkbox - Checking "I set the field" and "The field matches value" ticked.
And I set the field "Force format" to "1" And I set the field "Force format" to "1"
And I press "Save and return to course" And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page And I am on the "Test this one" "wiki activity editing" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And the field "Force format" matches value "1" And the field "Force format" matches value "1"
And the field "Force format" does not match value "" And the field "Force format" does not match value ""
# Checkbox - Checking "I set the field" and "The field matches value" unticked. # Checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Force format" to "" And I set the field "Force format" to ""
And I press "Save and return to course" And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page And I am on the "Test this one" "wiki activity editing" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And the field "Force format" matches value "" And the field "Force format" matches value ""
And the field "Force format" does not match value "1" And the field "Force format" does not match value "1"
@ -77,8 +74,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values: And I set the following fields to these values:
| Force format | 1 | | Force format | 1 |
And I press "Save and return to course" And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page And I am on the "Test this one" "wiki activity editing" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And the following fields match these values: And the following fields match these values:
| Force format | 1 | | Force format | 1 |
@ -88,8 +84,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values: And I set the following fields to these values:
| Force format | | | Force format | |
And I press "Save and return to course" And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page And I am on the "Test this one" "wiki activity editing" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And the following fields match these values: And the following fields match these values:
| Force format | | | Force format | |
@ -142,8 +137,6 @@ Feature: Verify that all form fields values can be get and set
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And the field "Course ID number" matches value "Course id number" And the field "Course ID number" matches value "Course id number"
Scenario: with JS disabled all form fields getters and setters works as expected
@javascript @javascript
Scenario: with JS enabled all form fields getters and setters works as expected Scenario: with JS enabled all form fields getters and setters works as expected
Then I am on the "Course 1" "groups" page Then I am on the "Course 1" "groups" page

View file

@ -152,14 +152,11 @@ Feature: Apply tour filters to a tour
| fullname | shortname | format | enablecompletion | | fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 | | Course 1 | C1 | topics | 1 |
| Course 2 | C2 | topics | 1 | | Course 2 | C2 | topics | 1 |
And the following "activities" exist:
| activity | course | name | firstpagetitle | wikimode |
| wiki | C1 | Test wiki name | First page | collaborative |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 2" course homepage with editing mode on
And I add a "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
| First page name | First page |
| Wiki mode | Collaborative wiki |
And I am on "Course 2" course homepage
And I add a "Forum" to section "1" and I fill the form with: And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name | | Forum name | Test forum name |
| Forum type | Standard forum for general use | | Forum type | Standard forum for general use |

View file

@ -19,18 +19,10 @@ Feature: A teacher can set a wiki to be collaborative or individual
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activity" exists: And the following "activities" exist:
| course | C1 | | activity | course | name | firstpagetitle | wikimode |
| activity | wiki | | wiki | C1 | Collaborative wiki name | Collaborative index | collaborative |
| name | Collaborative wiki name | | wiki | C1 | Individual wiki name | Individual index | individual |
| firstpagetitle | Collaborative index |
| wikimode | collaborative |
And the following "activity" exists:
| course | C1 |
| activity | wiki |
| name | Individual wiki name |
| firstpagetitle | Individual index |
| wikimode | individual |
And I am on the "Collaborative wiki name" "wiki activity" page logged in as teacher1 And I am on the "Collaborative wiki name" "wiki activity" page logged in as teacher1
And I press "Create page" And I press "Create page"
And I set the following fields to these values: And I set the following fields to these values:
@ -41,7 +33,6 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Individual teacher1 edition | | HTML format | Individual teacher1 edition |
And I press "Save" And I press "Save"
And I log out
And I am on the "Collaborative wiki name" "wiki activity" page logged in as student1 And I am on the "Collaborative wiki name" "wiki activity" page logged in as student1
Then I should see "Collaborative teacher1 edition" Then I should see "Collaborative teacher1 edition"
And I select "Edit" from the "jump" singleselect And I select "Edit" from the "jump" singleselect
@ -56,7 +47,6 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Individual student1 edition | | HTML format | Individual student1 edition |
And I press "Save" And I press "Save"
And I log out
And I am on the "Individual wiki name" "wiki activity" page logged in as student2 And I am on the "Individual wiki name" "wiki activity" page logged in as student2
And I should not see "Individual teacher1 edition" And I should not see "Individual teacher1 edition"
And I should not see "Individual student1 edition" And I should not see "Individual student1 edition"
@ -64,7 +54,6 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Individual student2 edition | | HTML format | Individual student2 edition |
And I press "Save" And I press "Save"
And I log out
And I am on the "Collaborative wiki name" "wiki activity" page logged in as teacher1 And I am on the "Collaborative wiki name" "wiki activity" page logged in as teacher1
And I should see "Collaborative student1 edition" And I should see "Collaborative student1 edition"
And I am on the "Individual wiki name" "wiki activity" page And I am on the "Individual wiki name" "wiki activity" page

View file

@ -30,13 +30,11 @@ Feature: A history of each wiki page is available
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | First edition | | HTML format | First edition |
And I press "Save" And I press "Save"
And I log out
When I am on the "Test wiki name" "wiki activity" page logged in as student1 When I am on the "Test wiki name" "wiki activity" page logged in as student1
And I select "Edit" from the "jump" singleselect And I select "Edit" from the "jump" singleselect
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Second edition | | HTML format | Second edition |
And I press "Save" And I press "Save"
And I log out
When I am on the "Test wiki name" "wiki activity" page logged in as student2 When I am on the "Test wiki name" "wiki activity" page logged in as student2
And I select "Edit" from the "jump" singleselect And I select "Edit" from the "jump" singleselect
And I set the following fields to these values: And I set the following fields to these values:

View file

@ -20,7 +20,6 @@ Feature: Edited wiki pages may be previewed before saving
| activity | wiki | | activity | wiki |
| course | C1 | | course | C1 |
| name | Test wiki name | | name | Test wiki name |
| intro | Test wiki description |
| wikimode | collaborative | | wikimode | collaborative |
And I am on the "Test wiki name" "wiki activity" page logged in as student1 And I am on the "Test wiki name" "wiki activity" page logged in as student1
When I press "Create page" When I press "Create page"

View file

@ -18,7 +18,6 @@ Feature: Teachers can reset wiki pages, tags and files
| activity | wiki | | activity | wiki |
| course | C1 | | course | C1 |
| name | Test wiki name | | name | Test wiki name |
| intro | Test wiki description |
| wikimode | collaborative | | wikimode | collaborative |
And I am on the "Test wiki name" "wiki activity" page logged in as teacher1 And I am on the "Test wiki name" "wiki activity" page logged in as teacher1
And I press "Create page" And I press "Create page"

View file

@ -21,12 +21,10 @@ Feature: View activity completion information in the Wiki activity
| course | C1 | | course | C1 |
| idnumber | mh1 | | idnumber | mh1 |
| name | Music history | | name | Music history |
| section | 1 |
| completion | 2 | | completion | 2 |
| completionview | 1 | | completionview | 1 |
And I am on the "Music history" "wiki activity" page logged in as teacher1 And I am on the "Music history" "wiki activity" page logged in as teacher1
And I click on "Create page" "button" And I click on "Create page" "button"
And I log out
Scenario: View automatic completion items as a teacher and confirm all tabs display conditions Scenario: View automatic completion items as a teacher and confirm all tabs display conditions
When I am on the "Music history" "wiki activity" page logged in as teacher1 When I am on the "Music history" "wiki activity" page logged in as teacher1
@ -57,7 +55,6 @@ Feature: View activity completion information in the Wiki activity
And I press "Save and display" And I press "Save and display"
# Teacher view. # Teacher view.
And the manual completion button for "Music history" should be disabled And the manual completion button for "Music history" should be disabled
And I log out
# Student view. # Student view.
When I am on the "Music history" "wiki activity" page logged in as student1 When I am on the "Music history" "wiki activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done" Then the manual completion button of "Music history" is displayed as "Mark as done"

View file

@ -22,7 +22,6 @@ Feature: Users can comment on wiki pages
| activity | wiki | | activity | wiki |
| course | C1 | | course | C1 |
| name | Test wiki name | | name | Test wiki name |
| intro | Test wiki description |
| firstpagetitle | First page | | firstpagetitle | First page |
| wikimode | collaborative | | wikimode | collaborative |
And I am on the "Test wiki name" "wiki activity" page logged in as teacher1 And I am on the "Test wiki name" "wiki activity" page logged in as teacher1
@ -30,7 +29,6 @@ Feature: Users can comment on wiki pages
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | First edition | | HTML format | First edition |
And I press "Save" And I press "Save"
And I log out
And I am on the "Test wiki name" "wiki activity" page logged in as student1 And I am on the "Test wiki name" "wiki activity" page logged in as student1
And I select "Comments" from the "jump" singleselect And I select "Comments" from the "jump" singleselect
And I follow "Add comment" And I follow "Add comment"
@ -54,16 +52,14 @@ Feature: Users can comment on wiki pages
@javascript @javascript
Scenario: Student cannot edit another student's comment Scenario: Student cannot edit another student's comment
When I log out When I am on the "Test wiki name" "wiki activity" page logged in as student2
And I am on the "Test wiki name" "wiki activity" page logged in as student2
And I select "Comments" from the "jump" singleselect And I select "Comments" from the "jump" singleselect
Then "Edit" "link" should not exist in the "wiki-comments" "table" Then "Edit" "link" should not exist in the "wiki-comments" "table"
And "Delete" "link" should not exist in the "wiki-comments" "table" And "Delete" "link" should not exist in the "wiki-comments" "table"
@javascript @javascript
Scenario: Teacher can delete a student comment Scenario: Teacher can delete a student comment
When I log out When I am on the "Test wiki name" "wiki activity" page logged in as teacher1
And I am on the "Test wiki name" "wiki activity" page logged in as teacher1
And I select "Comments" from the "jump" singleselect And I select "Comments" from the "jump" singleselect
Then "Edit" "link" should not exist in the "wiki-comments" "table" Then "Edit" "link" should not exist in the "wiki-comments" "table"
And "Delete" "link" should exist in the "wiki-comments" "table" And "Delete" "link" should exist in the "wiki-comments" "table"

View file

@ -32,8 +32,6 @@ Feature: Users can search wikis
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Collaborative teacher1 page [[new page]] | | HTML format | Collaborative teacher1 page [[new page]] |
And I press "Save" And I press "Save"
And I am on "Course 1" course homepage
And I log out
And I am on the "Collaborative wiki name" "wiki activity" page logged in as student1 And I am on the "Collaborative wiki name" "wiki activity" page logged in as student1
And I follow "new page" And I follow "new page"
And I press "Create page" And I press "Create page"
@ -66,7 +64,6 @@ Feature: Users can search wikis
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Individual teacher1 page | | HTML format | Individual teacher1 page |
And I press "Save" And I press "Save"
And I log out
And I am on the "Individual wiki name" "wiki activity" page logged in as student1 And I am on the "Individual wiki name" "wiki activity" page logged in as student1
And I press "Create page" And I press "Create page"
And I set the following fields to these values: And I set the following fields to these values:
@ -76,7 +73,6 @@ Feature: Users can search wikis
And I press "Search wikis" And I press "Search wikis"
Then I should see "Individual student1 page" Then I should see "Individual student1 page"
And I should not see "Individual teacher1 page" And I should not see "Individual teacher1 page"
And I log out
And I am on the "Individual wiki name" "wiki activity" page logged in as student2 And I am on the "Individual wiki name" "wiki activity" page logged in as student2
And I press "Create page" And I press "Create page"
And I set the following fields to these values: And I set the following fields to these values:
@ -87,7 +83,6 @@ Feature: Users can search wikis
And I should see "Individual student2 page" And I should see "Individual student2 page"
And I should not see "Individual student1 page" And I should not see "Individual student1 page"
And I should not see "Individual teacher1 page" And I should not see "Individual teacher1 page"
And I log out
And I am on the "Individual wiki name" "wiki activity" page logged in as teacher1 And I am on the "Individual wiki name" "wiki activity" page logged in as teacher1
And I set the field "searchstring" to "page" And I set the field "searchstring" to "page"
And I press "Search wikis" And I press "Search wikis"
@ -136,7 +131,6 @@ Feature: Users can search wikis
And I set the following fields to these values: And I set the following fields to these values:
| HTML format | Group2 teacher1 page [[new page2]] | | HTML format | Group2 teacher1 page [[new page2]] |
And I press "Save" And I press "Save"
And I log out
And I am on the "Group wiki name" "wiki activity" page logged in as student1 And I am on the "Group wiki name" "wiki activity" page logged in as student1
And I follow "new page1" And I follow "new page1"
And I press "Create page" And I press "Create page"
@ -149,7 +143,6 @@ Feature: Users can search wikis
And I should not see "Group2 teacher1 page" And I should not see "Group2 teacher1 page"
And I should see "Group1 student1 new page" And I should see "Group1 student1 new page"
And I should not see "All participants teacher1 page" And I should not see "All participants teacher1 page"
And I log out
And I am on the "Group wiki name" "wiki activity" page logged in as student2 And I am on the "Group wiki name" "wiki activity" page logged in as student2
And I follow "new page2" And I follow "new page2"
And I press "Create page" And I press "Create page"