[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/my/tests/behat/ -> reset_all_pages.feature (source)

   1  @core @core_my
   2  Feature: Reset all personalised pages to default
   3    In order to reset everyone's personalised pages
   4    As an admin
   5    I need to press a button on the pages to customise the default pages
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | student1 | Student | 1 | student1@example.com |
  11        | student2 | Student | 2 | student2@example.com |
  12        | student3 | Student | 3 | student3@example.com |
  13      And I log in as "admin"
  14      And I set the following system permissions of "Authenticated user" role:
  15        | block/myprofile:addinstance | Allow |
  16        | moodle/block:edit | Allow |
  17      And I log out
  18  
  19      And I log in as "student1"
  20      And I follow "Dashboard" in the user menu
  21      And I press "Customise this page"
  22      And I add the "Comments" block
  23      And I press "Stop customising this page"
  24      And I should see "Comments"
  25      And I log out
  26  
  27      And I log in as "student2"
  28      And I follow "Profile" in the user menu
  29      And I should not see "Logged in user"
  30      And I press "Customise this page"
  31      And I add the "Logged in user" block
  32      And I press "Stop customising this page"
  33      And I should see "Logged in user"
  34      And I log out
  35  
  36      And I log in as "student3"
  37      And I follow "Dashboard" in the user menu
  38      And I should not see "Comments"
  39      And I follow "Profile" in the user menu
  40      And I should not see "Logged in user"
  41      And I log out
  42  
  43    Scenario: Reset Dashboard for all users
  44      Given I log in as "admin"
  45      And I navigate to "Default Dashboard page" node in "Site administration > Appearance"
  46      And I press "Blocks editing on"
  47      And I add the "Latest announcements" block
  48      And I open the "Online users" blocks action menu
  49      And I follow "Delete Online users"
  50      And I press "Yes"
  51      And I press "Blocks editing off"
  52      And I log out
  53  
  54      And I log in as "student1"
  55      And I follow "Dashboard" in the user menu
  56      And I should not see "Latest announcements"
  57      And I should see "Online users"
  58      And I log out
  59  
  60      And I log in as "student3"
  61      And I follow "Dashboard" in the user menu
  62      And I should not see "Latest announcements"
  63      And I should see "Online users"
  64      And I log out
  65  
  66      And I log in as "admin"
  67      And I navigate to "Default Dashboard page" node in "Site administration > Appearance"
  68      When I press "Reset Dashboard for all users"
  69      And I should see "All Dashboard pages have been reset to default."
  70      And I log out
  71  
  72      And I log in as "student1"
  73      And I follow "Dashboard" in the user menu
  74      Then I should see "Latest announcements"
  75      And I should not see "Comments"
  76      And I should not see "Online users"
  77      And I log out
  78  
  79      And I log in as "student3"
  80      And I follow "Dashboard" in the user menu
  81      And I should see "Latest announcements"
  82      And I should not see "Online users"
  83      And I log out
  84  
  85      # Check that this did not affect the customised profiles.
  86      And I log in as "student2"
  87      And I follow "Profile" in the user menu
  88      And I should see "Logged in user"
  89      And I should not see "Latest announcements"
  90  
  91    Scenario: Reset profile for all users
  92      Given I log in as "admin"
  93      And I navigate to "Default profile page" node in "Site administration > Appearance"
  94      And I press "Blocks editing on"
  95      And I add the "Latest announcements" block
  96      And I log out
  97  
  98      And I log in as "student2"
  99      And I follow "Profile" in the user menu
 100      And I should not see "Latest announcements"
 101      And I log out
 102  
 103      And I log in as "student3"
 104      And I follow "Profile" in the user menu
 105      And I should not see "Latest announcements"
 106      And I log out
 107  
 108      And I log in as "admin"
 109      And I navigate to "Default profile page" node in "Site administration > Appearance"
 110      When I press "Reset profile for all users"
 111      And I should see "All profile pages have been reset to default."
 112      And I log out
 113  
 114      And I log in as "student2"
 115      And I follow "Profile" in the user menu
 116      Then I should see "Latest announcements"
 117      And I should not see "Logged in user"
 118      And I log out
 119  
 120      And I log in as "student3"
 121      And I follow "Profile" in the user menu
 122      And I should see "Latest announcements"
 123      And I log out
 124  
 125      # Check that this did not affect the customised dashboards.
 126      And I log in as "student1"
 127      And I follow "Dashboard" in the user menu
 128      And I should see "Comments"
 129      And I should not see "Latest announcements"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1