mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +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
|
@ -19,13 +19,12 @@ Feature: Random glossary entry block is used in a course
|
|||
|
||||
Scenario: Student can not see the block if it is not configured
|
||||
When 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 the "Random glossary entry" block
|
||||
Then I should see "Please configure this block using the edit icon" in the "block_glossary_random" "block"
|
||||
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 "block_glossary_random" "block" should not exist
|
||||
And I log out
|
||||
|
||||
|
@ -34,8 +33,7 @@ Feature: Random glossary entry block is used in a course
|
|||
| activity | name | intro | course | idnumber | defaultapproval |
|
||||
| glossary | GlossaryAuto | Test glossary description | C1 | glossary1 | 1 |
|
||||
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 the "Random glossary entry" block
|
||||
And I configure the "block_glossary_random" block
|
||||
And I set the following fields to these values:
|
||||
|
@ -45,14 +43,14 @@ Feature: Random glossary entry block is used in a course
|
|||
And I press "Save changes"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block"
|
||||
And I click on "Add a new entry" "link" in the "AutoGlossaryblock" "block"
|
||||
And I set the following fields to these values:
|
||||
| Concept | Concept1 |
|
||||
| Definition | Definition1 |
|
||||
And I press "Save changes"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Concept1" in the "AutoGlossaryblock" "block"
|
||||
And I should see "Definition1" in the "AutoGlossaryblock" "block"
|
||||
And I should not see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block"
|
||||
|
@ -61,7 +59,7 @@ Feature: Random glossary entry block is used in a course
|
|||
| Concept | Concept2 |
|
||||
| Definition | Definition2 |
|
||||
And I press "Save changes"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
# Only the last entry appears in the block
|
||||
And I should not see "Concept1" in the "AutoGlossaryblock" "block"
|
||||
And I should not see "Definition1" in the "AutoGlossaryblock" "block"
|
||||
|
@ -78,8 +76,7 @@ Feature: Random glossary entry block is used in a course
|
|||
| activity | name | intro | course | idnumber | defaultapproval |
|
||||
| glossary | GlossaryManual | Test glossary description | C1 | glossary2 | 0 |
|
||||
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 the "Random glossary entry" block
|
||||
And I configure the "block_glossary_random" block
|
||||
And I set the following fields to these values:
|
||||
|
@ -89,18 +86,18 @@ Feature: Random glossary entry block is used in a course
|
|||
And I press "Save changes"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block"
|
||||
And I click on "Add a new entry" "link" in the "ManualGlossaryblock" "block"
|
||||
And I set the following fields to these values:
|
||||
| Concept | Concept1 |
|
||||
| Definition | Definition1 |
|
||||
And I press "Save changes"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block"
|
||||
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 should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block"
|
||||
And I follow "GlossaryManual"
|
||||
And I follow "Waiting approval"
|
||||
|
|
|
@ -23,7 +23,7 @@ Feature: Random glossary entry block linking to global glossary
|
|||
|
||||
Scenario: View random (last) entry in the global glossary
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 2"
|
||||
And I am on "Course 2" course homepage
|
||||
And I follow "Tips and Tricks"
|
||||
And I press "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
|
@ -33,8 +33,7 @@ Feature: Random glossary entry block linking to global glossary
|
|||
And I log out
|
||||
# As a teacher add a block to the course page linking to the global glossary.
|
||||
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 the "Random glossary entry" block
|
||||
And I configure the "block_glossary_random" block
|
||||
And I set the following fields to these values:
|
||||
|
@ -48,7 +47,7 @@ Feature: Random glossary entry block linking to global glossary
|
|||
And I log out
|
||||
# Student who can't see the module is still able to view entries in this block (because the glossary was marked as global)
|
||||
And I log in as "student1"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Never come late" in the "Tip of the day" "block"
|
||||
And I should not see "Add a new entry" in the "Tip of the day" "block"
|
||||
And I should see "View all entries" in the "Tip of the day" "block"
|
||||
|
@ -56,8 +55,7 @@ Feature: Random glossary entry block linking to global glossary
|
|||
|
||||
Scenario: Removing the global glossary that is used in random glossary block
|
||||
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 the "Random glossary entry" block
|
||||
And I configure the "block_glossary_random" block
|
||||
And I set the following fields to these values:
|
||||
|
@ -67,15 +65,15 @@ Feature: Random glossary entry block linking to global glossary
|
|||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "admin"
|
||||
And I am on course page "Course 2"
|
||||
And I am on "Course 2" course homepage
|
||||
And I follow "Tips and Tricks"
|
||||
And I follow "Edit settings"
|
||||
And I set the field "globalglossary" to "0"
|
||||
And I press "Save and return to course"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should see "Please configure this block using the edit icon." in the "Tip of the day" "block"
|
||||
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 "Tip of the day" "block" should not exist
|
||||
And I log out
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue