mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-71913 mod_wiki: Update behat tests
This commit is contained in:
parent
6c0e1eee94
commit
89878377b3
7 changed files with 27 additions and 27 deletions
|
@ -44,7 +44,7 @@ Feature: A teacher can set a wiki to be collaborative or individual
|
|||
And I log out
|
||||
And I am on the "Collaborative wiki name" "wiki activity" page logged in as student1
|
||||
Then I should see "Collaborative teacher1 edition"
|
||||
And I follow "Edit"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
And I set the following fields to these values:
|
||||
| HTML format | Collaborative student1 edition |
|
||||
And I press "Save"
|
||||
|
|
|
@ -33,7 +33,7 @@ Feature: Edited wiki pages handle tags correctly
|
|||
Then I should see "Example" in the ".wiki-tags" "css_element"
|
||||
And I should see "Page" in the ".wiki-tags" "css_element"
|
||||
And I should see "Cool" in the ".wiki-tags" "css_element"
|
||||
And I follow "Edit"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
Then I should see "Example" in the ".form-autocomplete-selection" "css_element"
|
||||
Then I should see "Page" in the ".form-autocomplete-selection" "css_element"
|
||||
Then I should see "Cool" in the ".form-autocomplete-selection" "css_element"
|
||||
|
@ -62,7 +62,7 @@ Feature: Edited wiki pages handle tags correctly
|
|||
Then I should see "OT1" in the ".wiki-tags" "css_element"
|
||||
And I should see "OT3" in the ".wiki-tags" "css_element"
|
||||
And I should not see "OT2" in the ".wiki-tags" "css_element"
|
||||
And I follow "Edit"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
And I should see "OT1" in the ".form-autocomplete-selection" "css_element"
|
||||
And I should see "OT3" in the ".form-autocomplete-selection" "css_element"
|
||||
And I should not see "OT2" in the ".form-autocomplete-selection" "css_element"
|
||||
|
|
|
@ -32,31 +32,31 @@ Feature: A history of each wiki page is available
|
|||
And I press "Save"
|
||||
And I log out
|
||||
When I am on the "Test wiki name" "wiki activity" page logged in as student1
|
||||
And I follow "Edit"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
And I set the following fields to these values:
|
||||
| HTML format | Second edition |
|
||||
And I press "Save"
|
||||
And I log out
|
||||
When I am on the "Test wiki name" "wiki activity" page logged in as student2
|
||||
And I follow "Edit"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
And I set the following fields to these values:
|
||||
| HTML format | Third edition |
|
||||
And I press "Save"
|
||||
And I follow "History"
|
||||
And I select "History" from the "jump" singleselect
|
||||
# Checking that there are 3 history items (the first one is are th)
|
||||
And "//*[@id='region-main']/descendant::table/descendant::tr[4]" "xpath_element" should exist
|
||||
And I click on "1" "link" in the "Teacher 1" "table_row"
|
||||
And I should see "First edition"
|
||||
And I should see "Teacher 1"
|
||||
And I follow "History"
|
||||
And I follow "Back"
|
||||
And I click on "2" "link" in the "Student 1" "table_row"
|
||||
And I should see "Second edition"
|
||||
And I should see "Student 1"
|
||||
And I follow "History"
|
||||
And I follow "Back"
|
||||
And I click on "3" "link" in the "Student 2" "table_row"
|
||||
And I should see "Third edition"
|
||||
And I should see "Student 2" in the "region-main" "region"
|
||||
And I follow "History"
|
||||
And I follow "Back"
|
||||
And I click on "comparewith" "radio" in the "Student 1" "table_row"
|
||||
And I click on "compare" "radio" in the "Teacher 1" "table_row"
|
||||
And I press "Compare selected"
|
||||
|
|
|
@ -32,7 +32,7 @@ Feature: Edited wiki pages may be previewed before saving
|
|||
And I should see "Student page contents to be previewed"
|
||||
And I press "Save"
|
||||
And I should see "Student page contents to be previewed"
|
||||
And I follow "Edit"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
|
||||
@javascript
|
||||
Scenario: Page contents preview before saving with Javascript enabled
|
||||
|
|
|
@ -28,13 +28,13 @@ Feature: Teachers can reset wiki pages, tags and files
|
|||
And I press "Save"
|
||||
And I should see "Test tag 1" in the ".wiki-tags" "css_element"
|
||||
And I should see "Test tag 2" in the ".wiki-tags" "css_element"
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
And I follow "Add comment"
|
||||
And I set the following fields to these values:
|
||||
| Comment | Test comment |
|
||||
And I press "Save changes"
|
||||
And I should see "Test comment"
|
||||
And I follow "Files"
|
||||
And I select "Files" from the "jump" singleselect
|
||||
And I press "Edit wiki files"
|
||||
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
|
||||
And I press "Save changes"
|
||||
|
@ -54,12 +54,12 @@ Feature: Teachers can reset wiki pages, tags and files
|
|||
And I press "Continue"
|
||||
And I am on the "Test wiki name" "wiki activity" page
|
||||
And I press "Create page"
|
||||
When I follow "View"
|
||||
When I select "View" from the "jump" singleselect
|
||||
Then I should not see "Test tag 1"
|
||||
And I should not see "Test tag 2"
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
And I should not see "Test comment"
|
||||
And I follow "Files"
|
||||
And I select "Files" from the "jump" singleselect
|
||||
And I should not see "empty.txt"
|
||||
|
||||
Scenario: Reset only tags
|
||||
|
@ -73,9 +73,9 @@ Feature: Teachers can reset wiki pages, tags and files
|
|||
And I am on the "Test wiki name" "wiki activity" page
|
||||
Then I should not see "Test tag 1"
|
||||
And I should not see "Test tag 2"
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
And I should see "Test comment"
|
||||
And I follow "Files"
|
||||
And I select "Files" from the "jump" singleselect
|
||||
And I should see "empty.txt"
|
||||
|
||||
Scenario: Reset only comments
|
||||
|
@ -89,7 +89,7 @@ Feature: Teachers can reset wiki pages, tags and files
|
|||
And I am on the "Test wiki name" "wiki activity" page
|
||||
Then I should see "Test tag 1"
|
||||
And I should see "Test tag 2"
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
And I should not see "Test comment"
|
||||
And I follow "Files"
|
||||
And I select "Files" from the "jump" singleselect
|
||||
And I should see "empty.txt"
|
||||
|
|
|
@ -31,15 +31,15 @@ Feature: View activity completion information in the Wiki activity
|
|||
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
|
||||
Then "Music history" should have the "View" completion condition
|
||||
And I click on "Edit" "link" in the "region-main" "region"
|
||||
And I select "Edit" from the "jump" singleselect
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Map"
|
||||
And I select "Map" from the "jump" singleselect
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Files"
|
||||
And I select "Files" from the "jump" singleselect
|
||||
And "Music history" should have the "View" completion condition
|
||||
And I follow "Administration"
|
||||
And I select "Administration" from the "jump" singleselect
|
||||
And "Music history" should have the "View" completion condition
|
||||
|
||||
Scenario: View automatic completion items as a student
|
||||
|
|
|
@ -32,7 +32,7 @@ Feature: Users can comment on wiki pages
|
|||
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 follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
And I follow "Add comment"
|
||||
And I set the following fields to these values:
|
||||
| Comment | student 1 original comment |
|
||||
|
@ -56,7 +56,7 @@ Feature: Users can comment on wiki pages
|
|||
Scenario: Student cannot edit another student's comment
|
||||
When I log out
|
||||
And I am on the "Test wiki name" "wiki activity" page logged in as student2
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
Then "Edit" "link" should not exist in the "wiki-comments" "table"
|
||||
And "Delete" "link" should not exist in the "wiki-comments" "table"
|
||||
|
||||
|
@ -64,6 +64,6 @@ Feature: Users can comment on wiki pages
|
|||
Scenario: Teacher can delete a student comment
|
||||
When I log out
|
||||
And I am on the "Test wiki name" "wiki activity" page logged in as teacher1
|
||||
And I follow "Comments"
|
||||
And I select "Comments" from the "jump" singleselect
|
||||
Then "Edit" "link" should not exist in the "wiki-comments" "table"
|
||||
And "Delete" "link" should exist in the "wiki-comments" "table"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue