[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/navigation/tests/behat/ -> view_my_courses.feature (source)

   1  @block @block_navigation
   2  Feature: View my courses in navigation block
   3    In order to navigate to my courses
   4    As a student
   5    I need my courses displayed in the navigation block
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | student1 | Student | 1 | student1@example.com |
  11      And the following "categories" exist:
  12        | name  | category | idnumber |
  13        | cat1  | 0        | cat1     |
  14        | cat2  | 0        | cat2     |
  15        | cat3  | 0        | cat3     |
  16        | cat31 | cat3     | cat31    |
  17        | cat32 | cat3     | cat32    |
  18        | cat33 | cat3     | cat33    |
  19      And the following "courses" exist:
  20        | fullname | shortname | category |
  21        | Course1  | c1        | cat1     |
  22        | Course2  | c2        | cat2     |
  23        | Course31 | c31       | cat31    |
  24        | Course32 | c32       | cat32    |
  25        | Course331| c331      | cat33    |
  26        | Course332| c332      | cat33    |
  27      And the following "course enrolments" exist:
  28        | user     | course | role    |
  29        | student1 | c1     | student |
  30        | student1 | c31    | student |
  31        | student1 | c331   | student |
  32  
  33    @javascript
  34    Scenario: The plain list of enrolled courses is shown
  35      Given the following config values are set as admin:
  36        | navshowmycoursecategories | 0 |
  37      And I log in as "student1"
  38      When I click on "Dashboard" "link" in the "Navigation" "block"
  39      Then I should not see "cat1" in the "Navigation" "block"
  40      And I should not see "cat2" in the "Navigation" "block"
  41      And I should see "c1" in the "Navigation" "block"
  42      And I should see "c31" in the "Navigation" "block"
  43      And I should see "c331" in the "Navigation" "block"
  44      And I should not see "c2" in the "Navigation" "block"
  45      And I should not see "c32" in the "Navigation" "block"
  46      And I should not see "c332" in the "Navigation" "block"
  47  
  48    @javascript
  49    Scenario: The nested list of enrolled courses is shown
  50      Given the following config values are set as admin:
  51        | navshowmycoursecategories | 1 |
  52      And I log in as "student1"
  53      When I click on "Dashboard" "link" in the "Navigation" "block"
  54      Then I should see "cat1" in the "Navigation" "block"
  55      And I should see "cat3" in the "Navigation" "block"
  56      And I should not see "cat2" in the "Navigation" "block"
  57      And I expand "cat3" node
  58      And I should see "cat31" in the "Navigation" "block"
  59      And I should see "cat33" in the "Navigation" "block"
  60      And I should not see "cat32" in the "Navigation" "block"
  61      And I expand "cat31" node
  62      And I should see "c31" in the "Navigation" "block"
  63      And I expand "cat33" node
  64      And I should see "c331" in the "Navigation" "block"
  65      And I should not see "c332" in the "Navigation" "block"
  66  
  67    @javascript
  68    Scenario: I can expand categories and courses as guest
  69      Given the following config values are set as admin:
  70        | navshowmycoursecategories | 1 |
  71        | navshowallcourses         | 1 |
  72      And I expand "Courses" node
  73      And I should see "cat1" in the "Navigation" "block"
  74      And I should see "cat2" in the "Navigation" "block"
  75      And I should see "cat3" in the "Navigation" "block"
  76      And I should not see "cat31" in the "Navigation" "block"
  77      And I should not see "cat32" in the "Navigation" "block"
  78      And I should not see "cat331" in the "Navigation" "block"
  79      And I should not see "c1" in the "Navigation" "block"
  80      And I should not see "c2" in the "Navigation" "block"
  81      And I should not see "c31" in the "Navigation" "block"
  82      And I should not see "c32" in the "Navigation" "block"
  83      When I expand "cat3" node
  84      And I expand "cat31" node
  85      And I expand "cat1" node
  86      Then I should see "cat1" in the "Navigation" "block"
  87      And I should see "cat2" in the "Navigation" "block"
  88      And I should see "cat3" in the "Navigation" "block"
  89      And I should see "cat31" in the "Navigation" "block"
  90      And I should see "cat32" in the "Navigation" "block"
  91      And I should not see "cat331" in the "Navigation" "block"
  92      And I should see "c1" in the "Navigation" "block"
  93      And I should not see "c2" in the "Navigation" "block"
  94      And I should see "c31" in the "Navigation" "block"
  95      And I should not see "c32" in the "Navigation" "block"


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