[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  @report @report_outline
   2  Feature: View an outline report
   3    In order to ensure the outline report works as expected
   4    As a teacher
   5    I need to log in as a teacher and view the outline report
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | format |
  10        | Course 1 | C1 | topics |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | [email protected]
  14        | student1 | Student | 1 | [email protected] |
  15        | student2 | Student | 2 | [email protected] |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20        | student2 | C1 | student |
  21      When I log in as "admin"
  22      And I follow "Course 1"
  23      And I turn editing mode on
  24      And I add a "Forum" to section "1" and I fill the form with:
  25        | Forum name | Forum name |
  26        | Description | Forum description |
  27      And I add a "Book" to section "1" and I fill the form with:
  28        | Name | Book name |
  29        | Description | Book description |
  30  
  31    @javascript
  32    Scenario: View the outline report when only the legacy log reader is enabled
  33      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
  34      And I click on "Enable" "link" in the "Legacy log" "table_row"
  35      And I click on "Disable" "link" in the "Standard log" "table_row"
  36      And I set the following administration settings values:
  37        | Log legacy data | 1 |
  38      And I log out
  39      And I log in as "student1"
  40      And I follow "Course 1"
  41      And I follow "Forum name"
  42      And I follow "Course 1"
  43      And I follow "Book name"
  44      And I log out
  45      And I log in as "student2"
  46      And I follow "Course 1"
  47      And I follow "Book name"
  48      And I log out
  49      And I log in as "teacher1"
  50      And I follow "Course 1"
  51      When I navigate to "Activity report" node in "Course administration > Reports"
  52      Then I should see "2" in the "//tr[contains(concat(' ', normalize-space(@class),' '),' r0 ')]/child::td[contains(concat(' ', normalize-space(@class),' '),' numviews ')]" "xpath_element"
  53      And I should see "1" in the "//tr[contains(concat(' ', normalize-space(@class),' '),' r1 ')]/child::td[contains(concat(' ', normalize-space(@class),' '),' numviews ')]" "xpath_element"
  54  
  55    @javascript
  56    Scenario: View the outline report when only the standard log reader is enabled
  57      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
  58      And "Enable" "link" should exist in the "Legacy log" "table_row"
  59      And "Disable" "link" should exist in the "Standard log" "table_row"
  60      And I log out
  61      And I log in as "student1"
  62      And I follow "Course 1"
  63      And I follow "Forum name"
  64      And I follow "Course 1"
  65      And I follow "Book name"
  66      And I log out
  67      And I log in as "student2"
  68      And I follow "Course 1"
  69      And I follow "Book name"
  70      And I log out
  71      And I log in as "admin"
  72      And I follow "Course 1"
  73      When I navigate to "Activity report" node in "Course administration > Reports"
  74      Then I should see "2" in the "//tr[contains(concat(' ', normalize-space(@class),' '),' r0 ')]/child::td[contains(concat(' ', normalize-space(@class),' '),' numviews ')]" "xpath_element"
  75      And I should see "1" in the "//tr[contains(concat(' ', normalize-space(@class),' '),' r1 ')]/child::td[contains(concat(' ', normalize-space(@class),' '),' numviews ')]" "xpath_element"
  76  
  77    @javascript
  78    Scenario: View the outline report when both the standard and legacy log readers are enabled
  79      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
  80      And I click on "Enable" "link" in the "Legacy log" "table_row"
  81      And "Disable" "link" should exist in the "Standard log" "table_row"
  82      And I set the following administration settings values:
  83        | Log legacy data | 1 |
  84      And I log out
  85      And I log in as "student1"
  86      And I follow "Course 1"
  87      And I follow "Forum name"
  88      And I follow "Course 1"
  89      And I follow "Book name"
  90      And I log out
  91      And I log in as "student2"
  92      And I follow "Course 1"
  93      And I follow "Book name"
  94      And I log out
  95      And I log in as "teacher1"
  96      And I follow "Course 1"
  97      When I navigate to "Activity report" node in "Course administration > Reports"
  98      Then I should see "2" in the "//tr[contains(concat(' ', normalize-space(@class),' '),' r0 ')]/child::td[contains(concat(' ', normalize-space(@class),' '),' numviews ')]" "xpath_element"
  99      And I should see "1" in the "//tr[contains(concat(' ', normalize-space(@class),' '),' r1 ')]/child::td[contains(concat(' ', normalize-space(@class),' '),' numviews ')]" "xpath_element"
 100  
 101    @javascript
 102    Scenario: View the outline report when no log reader is enabled
 103      Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
 104      And "Enable" "link" should exist in the "Legacy log" "table_row"
 105      And I click on "Disable" "link" in the "Standard log" "table_row"
 106      And I follow "Home"
 107      And I follow "Course 1"
 108      When I navigate to "Activity report" node in "Course administration > Reports"
 109      Then I should see "No log reader enabled"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1