[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/tests/behat/ -> manage_blocks.feature (source)

   1  @core @core_block
   2  Feature: Block appearances
   3    In order to configure blocks appearance
   4    As a teacher
   5    I need to add and modify block configuration for the page
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category |
  10        | Course 1 | C1 | 0 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | teacher | 1 | teacher1@example.com |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17      And I log in as "admin"
  18      And I am on site homepage
  19      And I follow "Course 1"
  20      And I follow "Turn editing on"
  21      And I add a "Survey" to section "1" and I fill the form with:
  22        | Name | Test survey name |
  23        | Survey type | ATTLS (20 item version) |
  24        | Description | Test survey description |
  25      And I add a "Book" to section "1" and I fill the form with:
  26        | Name | Test book name |
  27        | Description | Test book description |
  28      And I follow "Test book name"
  29      And I set the following fields to these values:
  30        | Chapter title | Book title |
  31        | Content       | Book content test test |
  32      And I press "Save changes"
  33      And I log out
  34      And I log in as "teacher1"
  35      And I follow "Course 1"
  36      And I follow "Turn editing on"
  37      And I add the "Comments" block
  38      And I configure the "Comments" block
  39      And I set the following fields to these values:
  40        | Display on page types | Any page |
  41      And I press "Save changes"
  42  
  43    Scenario: Block settings can be modified so that a block apprears on any page
  44      When I follow "Test survey name"
  45      Then I should see "Comments" in the "Comments" "block"
  46      And I follow "Course 1"
  47      And I configure the "Comments" block
  48      And I set the following fields to these values:
  49        | Display on page types | Any course page |
  50      And I press "Save changes"
  51      And I follow "Turn editing off"
  52      And I follow "Test survey name"
  53      And I should not see "Comments"
  54  
  55    Scenario: Block settings can be modified so that a block can be hidden or moved
  56      When I follow "Test book name"
  57      And I configure the "Comments" block
  58      And I set the following fields to these values:
  59        | Visible | No |
  60      And I press "Save changes"
  61      And I follow "Turn editing off"
  62      And I follow "Test book name"
  63      Then I should not see "Comments"
  64      And I expand "Course administration" node
  65      And I follow "Turn editing on"
  66      And I configure the "Comments" block
  67      And I set the following fields to these values:
  68        | Visible | Yes |
  69        | Region  | Right |
  70      And I press "Save changes"
  71      And I should see "Comments" in the "//*[@id='region-post' or @id='block-region-side-post']" "xpath_element"


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