[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/report/outline/tests/behat/ -> user.feature (source)

   1  @report @report_outline
   2  Feature: View the user page for the outline report
   3    In order to ensure the user page for the outline report works as expected
   4    As a student
   5    I need to log in as a student and view the user page for the outline report
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | format | showreports |
  10        | Course 1 | C1 | topics | 1 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | teacher1@example.com
  14        | student1 | Student | 1 | student1@example.com |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19      When I log in as "admin"
  20      And I am on site homepage
  21      And I follow "Course 1"
  22      And I turn editing mode on
  23      And I add a "Folder" to section "1" and I fill the form with:
  24        | Name | Folder name |
  25        | Description | Folder description |
  26      And I add a "URL" to section "1" and I fill the form with:
  27        | Name | URL name |
  28        | Description | URL description |
  29        | External URL | http://www.google.com |
  30  
  31    Scenario: View the user page when only the legacy log reader is enabled
  32      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
  33      And I click on "Enable" "link" in the "Legacy log" "table_row"
  34      And I click on "Disable" "link" in the "Standard log" "table_row"
  35      And the following config values are set as admin:
  36        | loglegacy | 1 | logstore_legacy |
  37      And I log out
  38      And I log in as "student1"
  39      And I follow "Course 1"
  40      # We want to view this multiple times, to make sure the count is working.
  41      And I follow "Folder name"
  42      And I follow "Folder name"
  43      And I follow "Folder name"
  44      And I follow "Folder name"
  45      And I follow "Course 1"
  46      # We want to view this multiple times, to make sure the count is working.
  47      And I follow "URL name"
  48      And I follow "URL name"
  49      And I follow "URL name"
  50      And I follow "Profile" in the user menu
  51      And I follow "Course 1"
  52      When I follow "Outline report"
  53      Then I should see "4 views" in the "Folder name" "table_row"
  54      And I should see "3 views" in the "URL name" "table_row"
  55      And I follow "Profile" in the user menu
  56      And I follow "Course 1"
  57      And I follow "Complete report"
  58      And I should see "4 views"
  59      And I should see "3 views"
  60  
  61    Scenario: View the user page when only the standard log reader is enabled
  62      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
  63      And "Enable" "link" should exist in the "Legacy log" "table_row"
  64      And "Disable" "link" should exist in the "Standard log" "table_row"
  65      And I log out
  66      And I log in as "student1"
  67      And I follow "Course 1"
  68      # We want to view this multiple times, to make sure the count is working.
  69      And I follow "Folder name"
  70      And I follow "Folder name"
  71      And I follow "Folder name"
  72      And I follow "Folder name"
  73      And I follow "Course 1"
  74      # We want to view this multiple times, to make sure the count is working.
  75      And I follow "URL name"
  76      And I follow "URL name"
  77      And I follow "URL name"
  78      And I follow "Profile" in the user menu
  79      And I follow "Course 1"
  80      When I follow "Outline report"
  81      Then I should see "4 views" in the "Folder name" "table_row"
  82      And I should see "3 views" in the "URL name" "table_row"
  83      And I follow "Profile" in the user menu
  84      And I follow "Course 1"
  85      When I follow "Complete report"
  86      And I should see "4 views"
  87      And I should see "3 views"
  88  
  89    Scenario: View the user page when both the standard and legacy log readers are enabled
  90      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
  91      And I click on "Enable" "link" in the "Legacy log" "table_row"
  92      And "Disable" "link" should exist in the "Standard log" "table_row"
  93      And the following config values are set as admin:
  94        | loglegacy | 1 | logstore_legacy |
  95      And I log out
  96      And I log in as "student1"
  97      And I follow "Course 1"
  98      # We want to view this multiple times, to make sure the count is working.
  99      And I follow "Folder name"
 100      And I follow "Folder name"
 101      And I follow "Folder name"
 102      And I follow "Folder name"
 103      And I follow "Course 1"
 104      # We want to view this multiple times, to make sure the count is working.
 105      And I follow "URL name"
 106      And I follow "URL name"
 107      And I follow "URL name"
 108      And I follow "Profile" in the user menu
 109      And I follow "Course 1"
 110      When I follow "Outline report"
 111      Then I should see "4 views" in the "Folder name" "table_row"
 112      And I should see "3 views" in the "URL name" "table_row"
 113      And I follow "Profile" in the user menu
 114      And I follow "Course 1"
 115      When I follow "Complete report"
 116      And I should see "4 views"
 117      And I should see "3 views"


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