From 46a2fbc4b7c8b03d745eb4754a5ad2ff306c8252 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Fri, 10 Apr 2015 15:29:09 +0800 Subject: [PATCH] MDL-49412 Navigation: Remaining behat fixed for nav branch Behat is passing after this change. Part of MDL-45774. --- admin/roles/assign.php | 2 +- .../ui/tests/behat/backup_courses.feature | 2 +- backup/util/ui/tests/behat/behat_backup.php | 6 ++-- .../behat/restore_moodle2_courses.feature | 1 + .../behat/block_activity_modules.feature | 28 +++++++++---------- .../block_course_summary_frontpage.feature | 7 +++-- .../behat/glossary_random_frontpage.feature | 1 + .../behat/configuring_html_block.feature | 2 ++ .../tests/behat/multiple_instances.feature | 1 + blocks/login/tests/behat/login_block.feature | 1 + .../tests/behat/expand_courses_node.feature | 13 ++++++--- .../behat/block_participants_course.feature | 1 + blocks/tests/behat/add_blocks.feature | 1 + .../configure_block_throughout_site.feature | 5 ++-- blocks/tests/behat/hide_blocks.feature | 2 +- blocks/tests/behat/manage_blocks.feature | 2 +- .../behat/restrict_available_blocks.feature | 2 +- .../behat/return_block_original_state.feature | 1 + .../behat/access_visible_cohorts.feature | 2 ++ .../tests/behat/upload_cohort_users.feature | 7 +++-- course/tests/behat/add_activities.feature | 2 +- files/tests/behat/course_files.feature | 2 ++ .../behat/publish_rubric_templates.feature | 1 + message/tests/behat/send_message.feature | 1 + .../tests/behat/submit_without_group.feature | 2 +- ...ature => lesson_student_dashboard.feature} | 22 +++++++-------- mod/quiz/tests/behat/backup.feature | 2 ++ .../upload/tests/behat/upload_file.feature | 2 +- 28 files changed, 73 insertions(+), 48 deletions(-) rename mod/lesson/tests/behat/{lesson_student_my_home.feature => lesson_student_dashboard.feature} (94%) diff --git a/admin/roles/assign.php b/admin/roles/assign.php index fee876b27ff..3d723b83623 100644 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -135,7 +135,7 @@ if ($roleid) { } } -if ($user->id != $USER->id) { +if (!empty($user) && ($user->id != $USER->id)) { $PAGE->navigation->extend_for_user($user); $PAGE->navbar->includesettingsbase = true; } diff --git a/backup/util/ui/tests/behat/backup_courses.feature b/backup/util/ui/tests/behat/backup_courses.feature index de40df1d437..6610eb944e5 100644 --- a/backup/util/ui/tests/behat/backup_courses.feature +++ b/backup/util/ui/tests/behat/backup_courses.feature @@ -66,4 +66,4 @@ Feature: Backup Moodle courses When I perform a quick backup of course "Course 2" Then I should see "Restore course" And I should see "Course backup area" - And I should see "backup-moodle2-course-" \ No newline at end of file + And I should see "backup-moodle2-course-" diff --git a/backup/util/ui/tests/behat/behat_backup.php b/backup/util/ui/tests/behat/behat_backup.php index 497283761a5..f6ec235bb2a 100644 --- a/backup/util/ui/tests/behat/behat_backup.php +++ b/backup/util/ui/tests/behat/behat_backup.php @@ -69,7 +69,7 @@ class behat_backup extends behat_base { // table elements are used, and we need to catch exceptions contantly. // Go to homepage. - $this->getSession()->visit($this->locate_path('/')); + $this->getSession()->visit($this->locate_path('/?redirect=0')); // Click the course link. $this->find_link($backupcourse)->click(); @@ -113,7 +113,7 @@ class behat_backup extends behat_base { // table elements are used, and we need to catch exceptions contantly. // Go to homepage. - $this->getSession()->visit($this->locate_path('/')); + $this->getSession()->visit($this->locate_path('/?redirect=0')); // Click the course link. $this->find_link($backupcourse)->click(); @@ -151,7 +151,7 @@ class behat_backup extends behat_base { // table elements are used, and we need to catch exceptions contantly. // Go to homepage. - $this->getSession()->visit($this->locate_path('/')); + $this->getSession()->visit($this->locate_path('/?redirect=0')); $this->wait(); // Click the course link. diff --git a/backup/util/ui/tests/behat/restore_moodle2_courses.feature b/backup/util/ui/tests/behat/restore_moodle2_courses.feature index ec07143ea50..5aad4a3758a 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses.feature @@ -15,6 +15,7 @@ Feature: Restore Moodle 2 course backups | assign | C3 | assign1 | Test assign name | Assign description | 1 | | data | C3 | data1 | Test database name | Database description | 2 | And I log in as "admin" + And I am on site homepage And I follow "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: diff --git a/blocks/activity_modules/tests/behat/block_activity_modules.feature b/blocks/activity_modules/tests/behat/block_activity_modules.feature index 3eefd4e5742..a2aedb69f37 100644 --- a/blocks/activity_modules/tests/behat/block_activity_modules.feature +++ b/blocks/activity_modules/tests/behat/block_activity_modules.feature @@ -34,48 +34,48 @@ Feature: Block activity modules | wiki | Frontpage wiki name | Frontpage wiki description | Acceptance test site | wiki0 | | workshop | Frontpage workshop name | Frontpage workshop description | Acceptance test site | workshop0 | - And I am on homepage + And I am on site homepage When I follow "Turn editing on" And I add the "Activities" block And I click on "Assignments" "link" in the "Activities" "block" Then I should see "Frontpage assignment name" - And I am on homepage + And I am on site homepage And I click on "Chats" "link" in the "Activities" "block" And I should see "Frontpage chat name" - And I am on homepage + And I am on site homepage And I click on "Choices" "link" in the "Activities" "block" And I should see "Frontpage choice name" - And I am on homepage + And I am on site homepage And I click on "Databases" "link" in the "Activities" "block" And I should see "Frontpage database name" - And I am on homepage + And I am on site homepage And I click on "Feedback" "link" in the "Activities" "block" And I should see "Frontpage feedback name" - And I am on homepage + And I am on site homepage And I click on "Forums" "link" in the "Activities" "block" And I should see "Frontpage forum name" - And I am on homepage + And I am on site homepage And I click on "External tools" "link" in the "Activities" "block" And I should see "Frontpage lti name" - And I am on homepage + And I am on site homepage And I click on "Quizzes" "link" in the "Activities" "block" And I should see "Frontpage quiz name" - And I am on homepage + And I am on site homepage And I click on "Glossaries" "link" in the "Activities" "block" And I should see "Frontpage glossary name" - And I am on homepage + And I am on site homepage And I click on "SCORM packages" "link" in the "Activities" "block" And I should see "Frontpage scorm name" - And I am on homepage + And I am on site homepage And I click on "Lessons" "link" in the "Activities" "block" And I should see "Frontpage lesson name" - And I am on homepage + And I am on site homepage And I click on "Wikis" "link" in the "Activities" "block" And I should see "Frontpage wiki name" - And I am on homepage + And I am on site homepage And I click on "Workshop" "link" in the "Activities" "block" And I should see "Frontpage workshop name" - And I am on homepage + And I am on site homepage And I click on "Resources" "link" in the "Activities" "block" And I should see "Frontpage book name" And I should see "Frontpage page name" diff --git a/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature b/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature index 5d9330ba486..50d7f1d1dd0 100644 --- a/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature +++ b/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature @@ -6,6 +6,7 @@ Feature: Course summary block used on the frontpage Background: Given I log in as "admin" + And I am on site homepage And I navigate to "Edit settings" node in "Front page settings" And I set the following fields to these values: | summary | Proved the summary block works! | @@ -14,13 +15,13 @@ Feature: Course summary block used on the frontpage # The course summary block a default front page block, so no need to add it. Scenario: Guest can view site summary - When I am on homepage + When I am on site homepage Then "Course/site summary" "block" should exist And I should see "Proved the summary block works!" in the "Course/site summary" "block" Scenario: Admin can see an edit icon when edit mode is on and follow it to the front page settings When I log in as "admin" - And I am on homepage + And I am on site homepage And I follow "Turn editing on" Then I should see "Proved the summary block works!" in the "Course/site summary" "block" And I click on "Edit" "link" in the "Course/site summary" "block" @@ -28,6 +29,6 @@ Feature: Course summary block used on the frontpage Scenario: Admin can not see edit icon when edit mode is off When I log in as "admin" - And I am on homepage + And I am on site homepage Then I should see "Proved the summary block works!" in the "Course/site summary" "block" And "Edit" "link" should not exist in the "Course/site summary" "block" diff --git a/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature b/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature index 269f63b4414..001814381a1 100644 --- a/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature +++ b/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature @@ -9,6 +9,7 @@ Scenario: Admin can add random glossary block to the frontpage | activity | name | intro | course | idnumber | | glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 | And I log in as "admin" + And I am on site homepage And I click on "Turn editing on" "link" in the "Administration" "block" And I add the "Random glossary entry" block And I configure the "block_glossary_random" block diff --git a/blocks/html/tests/behat/configuring_html_block.feature b/blocks/html/tests/behat/configuring_html_block.feature index ad255309f35..5c696d8373e 100644 --- a/blocks/html/tests/behat/configuring_html_block.feature +++ b/blocks/html/tests/behat/configuring_html_block.feature @@ -7,6 +7,7 @@ Feature: Adding and configuring HTML blocks @javascript Scenario: Configuring the HTML block with Javascript on Given I log in as "admin" + And I am on site homepage When I click on "Turn editing on" "link" in the "Administration" "block" And I add the "HTML" block And I configure the "(new HTML block)" block @@ -23,6 +24,7 @@ Feature: Adding and configuring HTML blocks Scenario: Configuring the HTML block with Javascript off Given I log in as "admin" + And I am on site homepage When I click on "Turn editing on" "link" in the "Administration" "block" And I add the "HTML" block And I configure the "(new HTML block)" block diff --git a/blocks/html/tests/behat/multiple_instances.feature b/blocks/html/tests/behat/multiple_instances.feature index 45b608f35ec..564c0b28dc0 100644 --- a/blocks/html/tests/behat/multiple_instances.feature +++ b/blocks/html/tests/behat/multiple_instances.feature @@ -6,6 +6,7 @@ Feature: Adding and configuring HTML blocks Background: Given I log in as "admin" + And I am on site homepage When I click on "Turn editing on" "link" in the "Administration" "block" And I add the "HTML" block diff --git a/blocks/login/tests/behat/login_block.feature b/blocks/login/tests/behat/login_block.feature index 4ecfcf429fc..a8673dfe814 100644 --- a/blocks/login/tests/behat/login_block.feature +++ b/blocks/login/tests/behat/login_block.feature @@ -9,6 +9,7 @@ Feature: Login from a block | username | password | firstname | lastname | email | | testuser | testpass | Test | User | student1@asd.com | And I log in as "admin" + And I am on site homepage And I navigate to "Turn editing on" node in "Front page settings" And I add the "Login" block diff --git a/blocks/navigation/tests/behat/expand_courses_node.feature b/blocks/navigation/tests/behat/expand_courses_node.feature index c424b77d3e1..9f28088c2ce 100644 --- a/blocks/navigation/tests/behat/expand_courses_node.feature +++ b/blocks/navigation/tests/behat/expand_courses_node.feature @@ -37,6 +37,7 @@ Feature: Expand the courses nodes within the navigation block And the following config values are set as admin: | navshowallcourses | 1 | And I log in as "admin" + And I am on site homepage And I follow "Course 2" And I turn editing mode on And I click on "Edit settings" "link" in the "Administration" "block" @@ -74,7 +75,8 @@ Feature: Expand the courses nodes within the navigation block @javascript Scenario: As the admin user I expand the courses and category nodes to see courses. When I log in as "admin" - And I should see "Home" in the "Navigation" "block" + And I am on site homepage + And I should see "Site home" in the "Navigation" "block" And I should see "Courses" in the "Navigation" "block" And I expand "Courses" node And I should see "cat1" in the "Navigation" "block" @@ -107,7 +109,8 @@ Feature: Expand the courses nodes within the navigation block @javascript Scenario: As teacher1 I expand the courses and category nodes to see courses. When I log in as "teacher1" - And I should see "Home" in the "Navigation" "block" + And I am on site homepage + And I should see "Site home" in the "Navigation" "block" And I should see "Courses" in the "Navigation" "block" And I expand "Courses" node And I should see "cat1" in the "Navigation" "block" @@ -136,7 +139,8 @@ Feature: Expand the courses nodes within the navigation block @javascript Scenario: As student1 I expand the courses and category nodes to see courses. When I log in as "student1" - And I should see "Home" in the "Navigation" "block" + And I am on site homepage + And I should see "Site home" in the "Navigation" "block" And I should see "Courses" in the "Navigation" "block" And I expand "Courses" node And I should see "cat1" in the "Navigation" "block" @@ -164,6 +168,7 @@ Feature: Expand the courses nodes within the navigation block @javascript Scenario: As guest I expand the courses and category nodes to see courses. When I log in as "guest" + And I am on site homepage And I should see "Home" in the "Navigation" "block" And I should see "Courses" in the "Navigation" "block" And I expand "Courses" node @@ -187,4 +192,4 @@ Feature: Expand the courses nodes within the navigation block And navigation node "c1" should not be expandable And navigation node "c2" should be expandable And navigation node "c3" should not be expandable - And navigation node "c4" should not be expandable \ No newline at end of file + And navigation node "c4" should not be expandable diff --git a/blocks/participants/tests/behat/block_participants_course.feature b/blocks/participants/tests/behat/block_participants_course.feature index 4c1ed34d28d..b788a41ae25 100644 --- a/blocks/participants/tests/behat/block_participants_course.feature +++ b/blocks/participants/tests/behat/block_participants_course.feature @@ -15,6 +15,7 @@ Feature: People Block used in a course | user | course | role | | student1 | C101 | student | And I log in as "admin" + And I am on site homepage And I follow "Course 1" And I turn editing mode on And I add the "People" block diff --git a/blocks/tests/behat/add_blocks.feature b/blocks/tests/behat/add_blocks.feature index 0762cc8e14d..09a0856921e 100644 --- a/blocks/tests/behat/add_blocks.feature +++ b/blocks/tests/behat/add_blocks.feature @@ -17,6 +17,7 @@ Feature: Add blocks | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" + And I am on site homepage And I follow "Course 1" And I turn editing mode on When I add the "Blog menu" block diff --git a/blocks/tests/behat/configure_block_throughout_site.feature b/blocks/tests/behat/configure_block_throughout_site.feature index 02b97c99ac4..399de54e6f6 100644 --- a/blocks/tests/behat/configure_block_throughout_site.feature +++ b/blocks/tests/behat/configure_block_throughout_site.feature @@ -15,6 +15,7 @@ Feature: Add and configure blocks throughout the site | user | course | role | | manager1 | Acceptance test site | manager | And I log in as "manager1" + And I am on site homepage And I follow "Turn editing on" And I add the "Comments" block And I configure the "Comments" block @@ -24,7 +25,7 @@ Feature: Add and configure blocks throughout the site When I follow "Course 1" Then I should see "Comments" in the "Comments" "block" And I should see "Save comment" in the "Comments" "block" - And I am on homepage + And I am on site homepage And I configure the "Comments" block And I set the following fields to these values: | Default weight | -10 (first) | @@ -60,7 +61,7 @@ Feature: Add and configure blocks throughout the site @javascript Scenario: Blocks can safely be customised Given I log in as "admin" - And I click on "My home" "link" in the "Navigation" "block" + And I click on "Dashboard" "link" in the "Navigation" "block" And I press "Customise this page" And I add the "HTML" block And I configure the "(new HTML block)" block diff --git a/blocks/tests/behat/hide_blocks.feature b/blocks/tests/behat/hide_blocks.feature index 72822ba11b7..50f08433acf 100644 --- a/blocks/tests/behat/hide_blocks.feature +++ b/blocks/tests/behat/hide_blocks.feature @@ -9,7 +9,7 @@ Feature: Block visibility | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - And I am on homepage + And I am on site homepage And I follow "Course 1" And I follow "Turn editing on" diff --git a/blocks/tests/behat/manage_blocks.feature b/blocks/tests/behat/manage_blocks.feature index 179e77d604d..69af08ee743 100644 --- a/blocks/tests/behat/manage_blocks.feature +++ b/blocks/tests/behat/manage_blocks.feature @@ -15,7 +15,7 @@ Feature: Block appearances | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I am on homepage + And I am on site homepage And I follow "Course 1" And I follow "Turn editing on" And I add a "Survey" to section "1" and I fill the form with: diff --git a/blocks/tests/behat/restrict_available_blocks.feature b/blocks/tests/behat/restrict_available_blocks.feature index 83ebacf4063..f33ed275df1 100644 --- a/blocks/tests/behat/restrict_available_blocks.feature +++ b/blocks/tests/behat/restrict_available_blocks.feature @@ -29,7 +29,7 @@ Feature: Allowed blocks controls Given I log in as "admin" And I set the following system permissions of "Teacher" role: | block/activity_modules:addinstance | Prohibit | - And I am on homepage + And I am on site homepage And I follow "Course 1" And I expand "Users" node And I follow "Permissions" diff --git a/blocks/tests/behat/return_block_original_state.feature b/blocks/tests/behat/return_block_original_state.feature index 7285d991992..8b43a40ec8b 100644 --- a/blocks/tests/behat/return_block_original_state.feature +++ b/blocks/tests/behat/return_block_original_state.feature @@ -9,6 +9,7 @@ Feature: The context of a block can always be returned to it's original state. | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" + And I am on site homepage When I follow "Course 1" And I follow "Turn editing on" And I add the "Tags" block diff --git a/cohort/tests/behat/access_visible_cohorts.feature b/cohort/tests/behat/access_visible_cohorts.feature index 03722ee5ff8..b787bb23d2d 100644 --- a/cohort/tests/behat/access_visible_cohorts.feature +++ b/cohort/tests/behat/access_visible_cohorts.feature @@ -74,6 +74,7 @@ Feature: Access visible and hidden cohorts @javascript Scenario: System manager can see all cohorts defined in the above contexts When I log in as "user1" + And I am on site homepage And I follow "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" And I set the field "Add method" to "Cohort sync" @@ -101,6 +102,7 @@ Feature: Access visible and hidden cohorts @javascript Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above When I log in as "user2" + And I am on site homepage And I follow "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" And I set the field "Add method" to "Cohort sync" diff --git a/cohort/tests/behat/upload_cohort_users.feature b/cohort/tests/behat/upload_cohort_users.feature index 80b1b4e5712..702107ef11a 100644 --- a/cohort/tests/behat/upload_cohort_users.feature +++ b/cohort/tests/behat/upload_cohort_users.feature @@ -15,10 +15,11 @@ Feature: Upload users to a cohort | Course 1 | C1 | 0 | | Course 2 | C2 | 0 | And I log in as "admin" + And I am on site homepage And I follow "Course 1" And I add "Cohort sync" enrolment method with: | Cohort | Cohort 1 | - And I am on homepage + And I am on site homepage And I follow "Course 2" And I add "Cohort sync" enrolment method with: | Cohort | Cohort 2 | @@ -35,14 +36,14 @@ Feature: Upload users to a cohort And I click on "Assign" "link" in the "Cohort 2" "table_row" And the "Current users" select box should contain "Mary Smith (marysmith@example.com)" And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)" - And I am on homepage + And I am on site homepage And I follow "Course 1" And I expand "Users" node And I follow "Enrolled users" And I should see "Tom Jones" And I should see "Bob Jones" And I should not see "Mary Smith" - And I am on homepage + And I am on site homepage And I follow "Course 2" And I expand "Users" node And I follow "Enrolled users" diff --git a/course/tests/behat/add_activities.feature b/course/tests/behat/add_activities.feature index d43c923063c..26f58e4b51d 100644 --- a/course/tests/behat/add_activities.feature +++ b/course/tests/behat/add_activities.feature @@ -47,7 +47,7 @@ Feature: Add activities to courses Scenario: Set activity description to required then add an activity supplying only the name Given I set the following administration settings values: | requiremodintro | Yes | - When I follow "Home" + When I am on site homepage And I follow "Course 1" And I add a "Database" to section "3" and I fill the form with: | Name | Test name | diff --git a/files/tests/behat/course_files.feature b/files/tests/behat/course_files.feature index 133635c1eee..9143b75a392 100644 --- a/files/tests/behat/course_files.feature +++ b/files/tests/behat/course_files.feature @@ -13,6 +13,7 @@ Feature: Course files | legacyfilesinnewcourses | 1 | | legacyfilesaddallowed | 1 | When I log in as "admin" + And I am on site homepage And I follow "Course 1" Then I should see "Legacy course files" And I follow "Legacy course files" @@ -29,6 +30,7 @@ Feature: Course files | legacyfilesinnewcourses | 1 | | legacyfilesaddallowed | 0 | When I log in as "admin" + And I am on site homepage And I follow "Course 1" Then I should see "Legacy course files" And I follow "Legacy course files" diff --git a/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature b/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature index 726a34a9d69..36e495c7cc5 100644 --- a/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature +++ b/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature @@ -23,6 +23,7 @@ Feature: Publish rubrics as templates | user | role | contextlevel | reference | | manager1 | manager | System | | And I log in as "manager1" + And I am on site homepage And I follow "Course 1" And I go to "Test assignment 1 name" advanced grading definition page And I set the following fields to these values: diff --git a/message/tests/behat/send_message.feature b/message/tests/behat/send_message.feature index ded2df7796b..fa0c26558ae 100644 --- a/message/tests/behat/send_message.feature +++ b/message/tests/behat/send_message.feature @@ -45,6 +45,7 @@ Feature: Users can send messages to each other When I press "Message" And I set the field "Message to send" to "Lorem ipsum sa messagus textus" And I press "Send message" + And I am on homepage And I follow "Messages" in the user menu And I set the field "Search people and messages" to "User Two" And I press "Search people and messages" diff --git a/mod/assign/tests/behat/submit_without_group.feature b/mod/assign/tests/behat/submit_without_group.feature index 72850162387..6273c73b998 100644 --- a/mod/assign/tests/behat/submit_without_group.feature +++ b/mod/assign/tests/behat/submit_without_group.feature @@ -105,4 +105,4 @@ Feature: Submit assignment without group And I should see "Group 1" in the "Student 1" "table_row" And I should see "Group 1" in the "Student 2" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" - And I should see "Submitted for grading" in the "Student 2" "table_row" \ No newline at end of file + And I should see "Submitted for grading" in the "Student 2" "table_row" diff --git a/mod/lesson/tests/behat/lesson_student_my_home.feature b/mod/lesson/tests/behat/lesson_student_dashboard.feature similarity index 94% rename from mod/lesson/tests/behat/lesson_student_my_home.feature rename to mod/lesson/tests/behat/lesson_student_dashboard.feature index c11206c083f..5f352ccdbc3 100644 --- a/mod/lesson/tests/behat/lesson_student_my_home.feature +++ b/mod/lesson/tests/behat/lesson_student_dashboard.feature @@ -1,8 +1,8 @@ @mod @mod_lesson -Feature: In My home, a student can see their current status on all lessons with an upcoming due date +Feature: In Dashboard, a student can see their current status on all lessons with an upcoming due date In order to know my status on a lesson As a student - I need to see it in My home + I need to see it in Dashboard Background: Given the following "users" exist: @@ -67,7 +67,7 @@ Feature: In My home, a student can see their current status on all lessons with And I press "Submit" And I press "Continue" And I should see "Congratulations - end of lesson reached" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I click on ".collapsibleregioncaption" "css_element" And I should see "Completed, You can re-attempt this lesson" @@ -120,7 +120,7 @@ Feature: In My home, a student can see their current status on all lessons with And I press "Submit" And I press "Continue" And I should see "Congratulations - end of lesson reached" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should not see "You have lessons that are due" @javascript @@ -150,7 +150,7 @@ Feature: In My home, a student can see their current status on all lessons with And I press "Next page" And I should see "Second page contents" And I press "End of lesson" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I click on ".collapsibleregioncaption" "css_element" And I should see "Completed, You can re-attempt this lesson" @@ -186,7 +186,7 @@ Feature: In My home, a student can see their current status on all lessons with And I press "Next page" And I should see "Second page contents" And I press "End of lesson" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should not see "You have lessons that are due" @javascript @@ -227,7 +227,7 @@ Feature: In My home, a student can see their current status on all lessons with | False | 1 | And I press "Submit" And I press "Continue" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I click on ".collapsibleregioncaption" "css_element" And I should see "Lesson has been started, but not yet completed" @@ -258,7 +258,7 @@ Feature: In My home, a student can see their current status on all lessons with And I should see "First page contents" And I press "Next page" And I should see "Second page contents" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I click on ".collapsibleregioncaption" "css_element" And I should see "Lesson has been started, but not yet completed" @@ -294,7 +294,7 @@ Feature: In My home, a student can see their current status on all lessons with And I press "Save page" And I log out And I log in as "student1" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I click on ".collapsibleregioncaption" "css_element" And I should see "No attempts have been made on this lesson" @@ -320,7 +320,7 @@ Feature: In My home, a student can see their current status on all lessons with And I press "Save page" And I log out And I log in as "student1" - When I click on "My home" "link" in the "Navigation" "block" + When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I click on ".collapsibleregioncaption" "css_element" - And I should see "No attempts have been made on this lesson" \ No newline at end of file + And I should see "No attempts have been made on this lesson" diff --git a/mod/quiz/tests/behat/backup.feature b/mod/quiz/tests/behat/backup.feature index 66ed6fbb1b7..d5b647c6cfb 100644 --- a/mod/quiz/tests/behat/backup.feature +++ b/mod/quiz/tests/behat/backup.feature @@ -26,6 +26,7 @@ Feature: Backup and restore of quizzes | question | page | | TF1 | 1 | | TF2 | 2 | + And I am on site homepage When I follow "Course 1" And I turn editing mode on And I duplicate "Quiz 1" activity editing the new copy with: @@ -37,6 +38,7 @@ Feature: Backup and restore of quizzes @javascript @_file_upload Scenario: Restore a Moodle 2.8 quiz backup + And I am on site homepage When I follow "Course 1" And I navigate to "Restore" node in "Course administration" And I press "Manage backup files" diff --git a/repository/upload/tests/behat/upload_file.feature b/repository/upload/tests/behat/upload_file.feature index 199bed37e5e..ab3c50ee2e3 100644 --- a/repository/upload/tests/behat/upload_file.feature +++ b/repository/upload/tests/behat/upload_file.feature @@ -10,7 +10,7 @@ Feature: Upload files | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - When I navigate to "My private files" node in "My profile" + When I follow "Manage my private files..." And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager Then I should see "1" elements in "Files" filemanager And I should see "empty.txt" in the "div.fp-content" "css_element"