[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/behat/ -> frontpage_display_modes.feature (source)

   1  @core @core_course
   2  Feature: Front page displays items in different modes
   3    In order to show a clean and clear list of the site categories and course
   4    As an admin
   5    I need to set different frontpage display modes
   6  
   7    Background:
   8      Given the following "categories" exist:
   9        | name                   | category | idnumber |
  10        | Category 1             | 0        | CAT1     |
  11        | Category 2             | 0        | CAT2     |
  12        | Category 1 child       | CAT1     | CAT11    |
  13        | Category 2 child       | CAT2     | CAT21    |
  14        | Category 1 child child | CAT11    | CAT111   |
  15        | Category 3             | 0        | CAT3     |
  16      And the following "courses" exist:
  17        | fullname     | shortname   | category |
  18        | Course 1 1   | COURSE1_1   | CAT1     |
  19        | Course 2 1   | COURSE2_1   | CAT2     |
  20        | Course 11 1  | COURSE11_1  | CAT11    |
  21        | Course 2 2   | COURSE2_2   | CAT2     |
  22        | Course 21 1  | COURSE21_1  | CAT21    |
  23        | Course 111 1 | COURSE111_1 | CAT111   |
  24        | Course 111 2 | COURSE111_2 | CAT111   |
  25      And I log in as "admin"
  26  
  27    @javascript
  28    Scenario: Displays a list of categories
  29      When I set the following administration settings values:
  30        | Front page items when logged in | List of categories |
  31        | Maximum category depth | 2 |
  32      And I am on site homepage
  33      Then I should see "Category 1" in the "region-main" "region"
  34      And I should see "Category 1 child" in the "region-main" "region"
  35      And I should not see "Category 1 child child" in the "region-main" "region"
  36      And I toggle "Category 1" category children visibility in frontpage
  37      And I should not see "Category 1 child" in the "region-main" "region"
  38      And I toggle "Category 1" category children visibility in frontpage
  39      And I should see "Category 1 child" in the "region-main" "region"
  40      And I toggle "Category 1 child" category children visibility in frontpage
  41      And I should see "Category 1 child child" in the "region-main" "region"
  42  
  43    @javascript
  44    Scenario: Displays a combo list
  45      When I set the following administration settings values:
  46        | Front page items when logged in | Combo list |
  47        | Maximum category depth | 2 |
  48      And I am on site homepage
  49      Then I should see "Category 1" in the "region-main" "region"
  50      And I should see "Category 1 child" in the "region-main" "region"
  51      And I should not see "Category 1 child child" in the "region-main" "region"
  52      And I should see "Course 1 1" in the "region-main" "region"
  53      And I should see "Course 2 2" in the "region-main" "region"
  54      And I should not see "Course 11 1" in the "region-main" "region"
  55      And I toggle "Category 1 child" category children visibility in frontpage
  56      And I should see "Course 11 1" in the "region-main" "region"
  57      And I should see "Category 1 child child" in the "region-main" "region"
  58      And I toggle "Category 1" category children visibility in frontpage
  59      And I should not see "Course 1 1" in the "region-main" "region"
  60      And I should not see "Category 1 child" in the "region-main" "region"
  61      And I toggle "Category 1" category children visibility in frontpage
  62      And I should see "Course 11 1" in the "region-main" "region"


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