mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to site home page to actually get to the course. Part of MDL-55611 epic.
This commit is contained in:
parent
3353cfd8c1
commit
fdeeaff954
458 changed files with 1697 additions and 2148 deletions
|
@ -30,7 +30,7 @@ Feature: Glossary entries can be organised in categories
|
|||
And I log out
|
||||
# Log in as a teacher and make sure nothing is yet autolinked
|
||||
And I log in as "teacher1"
|
||||
When I am on course page "Course 1"
|
||||
When I am on "Course 1" course homepage
|
||||
Then I should see "CategoryAutoLinks"
|
||||
And I should see "CategoryNoLinks"
|
||||
And "a.glossary.autolink" "css_element" should not exist
|
||||
|
@ -95,13 +95,13 @@ Feature: Glossary entries can be organised in categories
|
|||
And I should not see "EntryCategoryAL"
|
||||
And I should not see "EntryCategoryBoth"
|
||||
# Check that category is autolinked from the text in the course
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "CategoryAutoLinks"
|
||||
And I should see "CategoryAutoLinks" in the "a.glossary.autolink" "css_element"
|
||||
And I should see "CategoryNoLinks"
|
||||
And "//a[contains(.,'CategoryNoLinks')]" "xpath_element" should not exist
|
||||
# Delete a category with entries
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "MyGlossary"
|
||||
And I follow "Browse by category"
|
||||
And I press "Edit categories"
|
||||
|
|
|
@ -20,15 +20,14 @@ Feature: A teacher can set whether glossary entries are always editable or not
|
|||
And the following config values are set as admin:
|
||||
| maxeditingtime | 60 |
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Glossary" to section "1" and I fill the form with:
|
||||
| Name | Test glossary name |
|
||||
| Description | Test glossary description |
|
||||
| Always allow editing | No |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
When I add a glossary entry with the following data:
|
||||
| Concept | Test concept name |
|
||||
|
|
|
@ -19,15 +19,14 @@ Feature: A teacher can choose whether glossary entries require approval
|
|||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
Given I add a "Glossary" to section "1" and I fill the form with:
|
||||
| Name | Test glossary name |
|
||||
| Description | Test glossary entries require approval |
|
||||
| Approved by default | No |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
When I add a glossary entry with the following data:
|
||||
| Concept | Just a test concept |
|
||||
|
@ -36,13 +35,13 @@ Feature: A teacher can choose whether glossary entries require approval
|
|||
And I log out
|
||||
# Test that students can not see the unapproved entry.
|
||||
And I log in as "student2"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
Then I should see "No entries found in this section"
|
||||
And I log out
|
||||
# Approve the entry.
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
And I follow "Waiting approval"
|
||||
Then I should see "(this entry is currently hidden)"
|
||||
|
@ -52,18 +51,18 @@ Feature: A teacher can choose whether glossary entries require approval
|
|||
And I log out
|
||||
# Check that the entry can now be viewed by students.
|
||||
And I log in as "student2"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
Then I should see "Concept definition"
|
||||
And I log out
|
||||
# Undo the approval of the previous entry.
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
And I follow "Undo approval"
|
||||
And I log out
|
||||
# Check that the entry is no longer visible by students.
|
||||
And I log in as "student2"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
Then I should see "No entries found in this section"
|
||||
|
|
|
@ -16,8 +16,7 @@ Feature: A teacher can choose whether to allow duplicate entries in a glossary
|
|||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Glossary" to section "1" and I fill the form with:
|
||||
| Name | Test glossary name |
|
||||
| Description | Test glossary description |
|
||||
|
|
|
@ -17,8 +17,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent
|
|||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
|
||||
@javascript
|
||||
Scenario: Printer-friendly glossary view enabled
|
||||
|
@ -28,7 +27,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent
|
|||
| Allow print view | Yes |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
When I add a glossary entry with the following data:
|
||||
| Concept | Just a test concept |
|
||||
|
@ -46,7 +45,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent
|
|||
| Allow print view | No |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
When I add a glossary entry with the following data:
|
||||
| Concept | Just a test concept |
|
||||
|
|
|
@ -20,7 +20,7 @@ Feature: Glossary entries can be searched or browsed by alphabet, category, date
|
|||
| activity | name | intro | displayformat | course | idnumber |
|
||||
| glossary | Test glossary name | Test glossary description | fullwithauthor | C1 | g1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
And I add a glossary entries category named "The ones I like"
|
||||
And I add a glossary entries category named "All for you"
|
||||
|
@ -30,7 +30,7 @@ Feature: Glossary entries can be searched or browsed by alphabet, category, date
|
|||
| Categories | All for you |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
And I add a glossary entry with the following data:
|
||||
| Concept | Cucumber |
|
||||
|
@ -38,7 +38,7 @@ Feature: Glossary entries can be searched or browsed by alphabet, category, date
|
|||
| Categories | The ones I like |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test glossary name"
|
||||
|
||||
@javascript
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue