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:
Simey Lameze 2017-03-15 15:13:09 +08:00 committed by Damyon Wiese
parent 3353cfd8c1
commit fdeeaff954
458 changed files with 1697 additions and 2148 deletions

View file

@ -17,8 +17,7 @@ Feature: Set end of lesson reached as a completion condition for a lesson
| 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
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | Yes |
@ -47,22 +46,22 @@ Feature: Set end of lesson reached as a completion condition for a lesson
And I press "Save page"
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 the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete
And I follow "Test lesson"
And I press "Next page"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I should see "You have seen more than one page of this lesson already."
And I should see "Do you want to start at the last page you saw?"
And I click on "No" "link" in the "#page-content" "css_element"
And I press "Next page"
And I press "Next page"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then the "Test lesson" "lesson" activity with "auto" completion should be marked as complete
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 "Student 1" user has completed "Test lesson" activity

View file

@ -17,8 +17,7 @@ Feature: Set time spent as a completion condition for a lesson
| 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
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | Yes |
@ -49,7 +48,7 @@ Feature: Set time spent as a completion condition for a lesson
And I press "Save page"
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 the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete
And I follow "Test lesson"
And I press "Next page"
@ -58,17 +57,17 @@ Feature: Set time spent as a completion condition for a lesson
And I press "Next page"
And I should see "You completed this lesson in"
And I should see ", which is less than the required time of 10 secs. You might need to attempt the lesson again."
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I press "Next page"
And I wait "11" seconds
And I press "Next page"
And I should not see "You might need to attempt the lesson again."
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And the "Test lesson" "lesson" activity with "auto" completion should be marked as complete
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 "Student 1" user has completed "Test lesson" activity

View file

@ -17,8 +17,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson
| 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
Scenario: Forbidding lesson accesses until a specified date
Given I add a "Lesson" to section "1"
@ -42,7 +41,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson
And I press "Save page"
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
When I follow "Test lesson"
Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00"
And I should not see "First page contents"
@ -68,7 +67,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson
And I press "Save page"
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
When I follow "Test lesson"
Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00"
And I should not see "First page contents"

View file

@ -21,8 +21,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page
And I upload "mod/lesson/tests/fixtures/moodle_logo.jpg" file to "Files" filemanager
And I click on "Save changes" "button"
When I am on homepage
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 "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |

View file

@ -18,8 +18,7 @@ Feature: In a lesson activity, teacher can import blackboard fill in the blank q
| student1 | C1 | student |
And I log in as "teacher1"
When I am on homepage
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 "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |

View file

@ -18,8 +18,7 @@ Feature: In a lesson activity, teacher can import embedded images in questions a
| student1 | C1 | student |
And I log in as "teacher1"
When I am on homepage
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 "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |

View file

@ -16,8 +16,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| 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
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson name |
@ -47,7 +46,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
When I am on course page "Course 1"
When I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"
@ -85,13 +84,13 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
And I log out
Then I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"
@ -144,7 +143,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -163,7 +162,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I should see "Congratulations - end of lesson reached"
And I log out
Then I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"
@ -191,7 +190,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -199,7 +198,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "End of lesson"
And I log out
Then I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"

View file

@ -26,8 +26,7 @@ Feature: Lesson reset
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
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 follow "Test lesson name"
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@ -46,7 +45,7 @@ Feature: Lesson reset
Scenario: Use course reset to clear all attempt data
When 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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -56,7 +55,7 @@ Feature: Lesson reset
And I should see "Congratulations - end of lesson reached"
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 lesson name"
And I navigate to "Reports > Overview" in current page administration
And I should see "Sam1 Student1"
@ -65,7 +64,7 @@ Feature: Lesson reset
| Delete all lesson attempts | 1 |
And I press "Reset course"
And I press "Continue"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Reports > Overview" in current page administration
Then I should see "No attempts have been made on this lesson"
@ -85,7 +84,7 @@ Feature: Lesson reset
| Delete all user overrides | 1 |
And I press "Reset course"
And I press "Continue"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "User overrides" in current page administration
Then I should not see "Sam1 Student1"
@ -104,7 +103,7 @@ Feature: Lesson reset
| Delete all group overrides | 1 |
And I press "Reset course"
And I press "Continue"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Group overrides" in current page administration
Then I should not see "Group 1"

View file

@ -18,8 +18,7 @@ branch table contents
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -58,7 +57,7 @@ branch table contents
And I should not see "Previous page"
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 lesson name"
And I should see "First page contents"
And I should not see "Previous page"
@ -81,7 +80,7 @@ branch table contents
And I should not see "Incorrect answer"
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 lesson name"
And I should see "First page contents"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, teacher can edit a cluster page
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Lesson with cluster |
| Description | Test lesson description |
@ -90,7 +89,7 @@ Feature: In a lesson activity, teacher can edit a cluster page
And I should see "Modified end"
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 "Lesson with cluster"
And I should see "First page contents"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -70,7 +69,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages
And I should not see "Second page name"
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 lesson name"
And I should see "First page contents"
And I press "Next page"
@ -109,7 +108,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages
And I should not see "Hardest question ever"
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 lesson name"
And I should see "First page contents"
And I press "Next page"

View file

@ -16,8 +16,7 @@ Feature: In a lesson activity, teacher can add an essay question
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -32,7 +31,7 @@ Feature: In a lesson activity, teacher can add an essay question
And I press "Save page"
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
When I follow "Test lesson name"
Then I should see "Please write a story about a frog."
And I set the field "Your answer" to "<p>Once upon a time there was a little <b>green</b> frog."
@ -47,7 +46,7 @@ Feature: In a lesson activity, teacher can add an essay question
And I should see "Your current grade without the essay question(s) is 0 out of 1."
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 lesson name"
And I follow "Grade essays"
And I should see "Student 1"

View file

@ -33,8 +33,7 @@ Feature: Lesson group override
| activity | name | intro | groupmode | course | idnumber |
| lesson | Test lesson name | Test lesson description | 1 | C1 | lesson1 |
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 follow "Test lesson name"
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@ -110,7 +109,7 @@ Feature: Lesson group override
And I should see "Re-takes allowed"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -123,7 +122,7 @@ Feature: Lesson group override
And I should see "Cat is an amphibian"
And I log out
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -150,7 +149,7 @@ Feature: Lesson group override
And I should see "Password protected lesson"
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 lesson name"
Then I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@ -168,7 +167,7 @@ Feature: Lesson group override
And I should see "Congratulations - end of lesson reached"
And I log out
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 lesson name"
And I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@ -204,13 +203,13 @@ Feature: Lesson group override
And I should see "Lesson closes"
And I log out
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 lesson"
Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00"
And I should not see "Cat is an amphibian"
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 lesson"
And I should see "Cat is an amphibian"
@ -239,13 +238,13 @@ Feature: Lesson group override
And I should see "Lesson opens"
And I log out
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 lesson"
Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00"
And I should not see "Cat is an amphibian"
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 lesson"
And I should see "Cat is an amphibian"
@ -264,7 +263,7 @@ Feature: Lesson group override
And I should see "Maximum number of attempts"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -279,7 +278,7 @@ Feature: Lesson group override
And I should see "Congratulations - end of lesson reached"
And I log out
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -328,16 +327,16 @@ Feature: Lesson group override
And I should see "Friday, 1 January 2021, 8:00"
And I log out
Then 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 lesson"
And I should see "This lesson will be open on Friday, 1 January 2021, 8:00"
And I log out
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 lesson"
And I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00"
And I log out
And I log in as "student3"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00"

View file

@ -15,8 +15,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -44,7 +43,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
And I press "Save page"
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
When I follow "Test lesson name"
Then I should see "First page contents"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
| 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
Scenario: Student navigation with pages and questions
Given I add a "Lesson" to section "1" and I fill the form with:
@ -59,7 +58,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I press "Save page"
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
When I follow "Test lesson name"
Then I should see "First page contents"
And I press "Next page"
@ -107,7 +106,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I press "Save page"
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
When I follow "Test lesson name"
Then I should see "Test content"
And I set the following fields to these values:

View file

@ -19,8 +19,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
| 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
Scenario: number of student attempts
Given I add a "Lesson" to section "1"
@ -79,7 +78,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
And I press "Save page"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -119,7 +118,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
And I should see "Your score is 3 (out of 3)."
And I log out
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:

View file

@ -16,8 +16,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| 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
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson name |
@ -47,7 +46,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
When I am on course page "Course 1"
When I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"
@ -85,13 +84,13 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
And I log out
Then I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"
@ -129,7 +128,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -143,7 +142,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I should see "Congratulations - end of lesson reached"
And I log out
Then I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"
@ -168,7 +167,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -176,7 +175,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "End of lesson"
And I log out
Then I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"

View file

@ -17,8 +17,7 @@ Feature: Practice mode in a lesson activity
| 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
# Setup a basic lesson, we'll adjust it in the scenarios later.
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
@ -44,14 +43,14 @@ Feature: Practice mode in a lesson activity
And I press "Save and display"
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
And I follow "Non-practice lesson"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should see "View grades"
And I follow "Grades" in the user menu
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Non-practice lesson"
Scenario: Practice lesson doesn't record grades in the gradebook
@ -64,7 +63,7 @@ Feature: Practice mode in a lesson activity
And I press "Save and display"
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
And I follow "Practice lesson"
And I set the following fields to these values:
| True | 1 |
@ -85,7 +84,7 @@ Feature: Practice mode in a lesson activity
And I press "Save and display"
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
And I follow "Practice lesson with scale"
And I set the following fields to these values:
| True | 1 |

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, students can see their progress viewing a progres
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -58,7 +57,7 @@ Feature: In a lesson activity, students can see their progress viewing a progres
And I press "Save page"
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
When I follow "Test lesson name"
Then I should see "First page contents"
And I should see "You have completed 0% of the lesson"

View file

@ -16,8 +16,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than
| 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
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson name |
@ -94,7 +93,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than
Scenario: Check that we can leave a quiz and when we re-enter we can not re-attempt the question again
Given 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 lesson name"
And I should see "First page contents"
And I press "Next page"
@ -103,7 +102,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than
| False| 1 |
And I press "Submit"
And I should see "Wrong"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I should see "Do you want to start at the last page you saw?"
And I click on "No" "link" in the "#page-content" "css_element"
@ -118,7 +117,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than
@javascript @_bug_phantomjs
Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks
Given 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 lesson name"
And I should see "First page contents"
And I press "Next page"
@ -162,7 +161,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than
@javascript
Scenario: Check that we can not click back on the browser and re-attempt a question
Given 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 lesson name"
And I should see "First page contents"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, teachers can review student attempts
| 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
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson name |
@ -81,7 +80,7 @@ Feature: In a lesson activity, teachers can review student attempts
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -102,7 +101,7 @@ Feature: In a lesson activity, teachers can review student attempts
And I should see "Congratulations - end of lesson reached"
And I log out
Then 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 lesson name"
And I follow "Reports"
And I should see "Student 1"
@ -148,7 +147,7 @@ Feature: In a lesson activity, teachers can review student attempts
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -160,7 +159,7 @@ Feature: In a lesson activity, teachers can review student attempts
And I press "End of lesson"
And I log out
Then 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 lesson name"
And I follow "Reports"
And I should see "Student 1"

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -58,7 +57,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques
And I press "Save page"
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 lesson name"
And I should see "You have answered 0 correctly out of 0 attempts."
And I set the following fields to these values:

View file

@ -20,8 +20,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| activity | name | intro | deadline | retake | course | idnumber |
| lesson | Test lesson name | Test lesson description | 1893481200 | 1 | C1 | lesson1 |
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
Scenario: A completed lesson with only questions that allows multiple attempts
Given I follow "Test lesson name"
@ -53,7 +52,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -104,7 +103,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -140,7 +139,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "First page contents"
And I press "Next page"
@ -174,7 +173,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "First page contents"
And I press "Next page"
@ -213,7 +212,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -244,7 +243,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "First page contents"
And I press "Next page"
@ -332,7 +331,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson name 2"
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@ -343,8 +342,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page"
And I am on homepage
And I am on course page "Course 2"
And I am on "Course 2" course homepage
And I follow "Test lesson name 3"
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@ -366,14 +364,13 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Save page"
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 lesson name"
And I should see "D035 M00d13 r0x0rz j00 b0x0rs?"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
And I am on homepage
And I am on course page "Course 2"
And I am on "Course 2" course homepage
And I follow "Test lesson name 3"
And I should see "D035 M00d13 r0x0rz j00 b0x0rs?"
And I set the following fields to these values:

View file

@ -15,8 +15,7 @@ Feature: In a lesson activity a student should
| 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
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson name |
@ -79,7 +78,7 @@ Feature: In a lesson activity a student should
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -155,7 +154,7 @@ Feature: In a lesson activity a student should
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
@ -176,7 +175,7 @@ Feature: In a lesson activity a student should
And I press "End of lesson"
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 lesson name"
And I should see "First page contents"
And I log out
@ -263,7 +262,7 @@ Feature: In a lesson activity a student should
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -378,7 +377,7 @@ Feature: In a lesson activity a student should
And I press "Save page"
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
And I follow "Test lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:

View file

@ -26,8 +26,7 @@ Feature: Lesson user override
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
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 follow "Test lesson name"
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@ -104,7 +103,7 @@ Feature: Lesson user override
And I should see "Re-takes allowed"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -117,7 +116,7 @@ Feature: Lesson user override
And I should see "Cat is an amphibian"
And I log out
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -144,7 +143,7 @@ Feature: Lesson user override
And I should see "Password protected lesson"
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 lesson name"
Then I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@ -162,7 +161,7 @@ Feature: Lesson user override
And I should see "Congratulations - end of lesson reached"
And I log out
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 lesson name"
And I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@ -198,13 +197,13 @@ Feature: Lesson user override
And I should see "Lesson closes"
And I log out
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 lesson"
Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00"
And I should not see "Cat is an amphibian"
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 lesson"
And I should see "Cat is an amphibian"
@ -233,13 +232,13 @@ Feature: Lesson user override
And I should see "Lesson opens"
And I log out
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 lesson"
Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00"
And I should not see "Cat is an amphibian"
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 lesson"
And I should see "Cat is an amphibian"
@ -258,7 +257,7 @@ Feature: Lesson user override
And I should see "Maximum number of attempts"
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@ -273,7 +272,7 @@ Feature: Lesson user override
And I should see "Congratulations - end of lesson reached"
And I log out
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 lesson name"
And I should see "Cat is an amphibian"
And I set the following fields to these values:

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, students can see questions in random order
| 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
Scenario: Lesson with two clusters
Given I add a "Lesson" to section "1" and I fill the form with:
@ -122,7 +121,7 @@ Feature: In a lesson activity, students can see questions in random order
And I press "Save page"
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
When I follow "Lesson with clusters"
Then I should see "First page contents"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: In a lesson activity, students can see questions in random order and a
| 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
Scenario: Lesson with subcluster
Given I add a "Lesson" to section "1" and I fill the form with:
@ -142,7 +141,7 @@ Feature: In a lesson activity, students can see questions in random order and a
And I press "Save page"
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
When I follow "Lesson with subcluster"
Then I should see "First page contents"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: link to gradebook on the end of lesson page
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson |
| Description | Test lesson description |
@ -43,7 +42,7 @@ Feature: link to gradebook on the end of lesson page
Scenario: Link to gradebook for non practice lesson
Given 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
And I follow "Test lesson"
And I press "Next page"
And I press "Next page"
@ -61,7 +60,7 @@ Feature: link to gradebook on the end of lesson page
And I press "Save and display"
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
And I follow "Test lesson"
And I press "Next page"
And I press "Next page"
@ -76,7 +75,7 @@ Feature: link to gradebook on the end of lesson page
And I press "Save and display"
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
And I follow "Test lesson"
And I press "Next page"
And I press "Next page"
@ -84,14 +83,14 @@ Feature: link to gradebook on the end of lesson page
And I should not see "View grades"
Scenario: No link if Show gradebook to student disabled
Given I am on course page "Course 1"
Given I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Show gradebook to students | No |
And I press "Save and display"
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
And I follow "Test lesson"
And I press "Next page"
And I press "Next page"
@ -106,7 +105,7 @@ Feature: link to gradebook on the end of lesson page
| gradereport/user:view | Prevent |
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
And I follow "Test lesson"
And I press "Next page"
And I press "Next page"

View file

@ -17,8 +17,7 @@ Feature: A teacher can password protect a lesson
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson |
| Description | Test lesson description |
@ -33,7 +32,7 @@ Feature: A teacher can password protect a lesson
And I press "Save page"
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
When I follow "Test lesson"
Then I should see "Test lesson is a password protected lesson"
And I should not see "First page contents"

View file

@ -21,8 +21,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
And I upload "mod/lesson/tests/fixtures/moodle_logo.jpg" file to "Files" filemanager
And I click on "Save changes" "button"
When I am on homepage
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 "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -79,7 +78,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
And I press "Save page"
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
When I follow "Test lesson name"
Then I should see "What animal is an amphibian?"
And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'pluginfile.php')]" "xpath_element" should exist

View file

@ -34,9 +34,7 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
| student2 | G2 |
| student3 | G3 |
And I log in as "teacher1"
And I am on homepage
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 "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Test lesson description |
@ -51,19 +49,19 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
And I press "Save page"
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 lesson name"
And I set the field "Your answer" to "<p>Once upon a time there was a little green frog."
And I press "Submit"
And I log out
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 lesson name"
And I set the field "Your answer" to "<p>Once upon a time there were two little green frogs."
And I press "Submit"
And I log out
When 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 lesson name"
Then I should see "Grade essays"
And I follow "Grade essays"
@ -88,7 +86,7 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
And I should see "No one in Group C has answered an essay question yet."
And I log out
And I log in as "teacher2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Then I should see "Grade essays"
And I follow "Grade essays"

View file

@ -18,8 +18,7 @@ Feature: A teacher can set a time limit for a lesson
| 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
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson |
| Description | Test lesson description |
@ -35,7 +34,7 @@ Feature: A teacher can set a time limit for a lesson
And I press "Save page"
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
When I follow "Test lesson"
Then I should see "You have 1 min to finish the lesson."
And I wait "3" seconds