[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  @core @core_course
   2  Feature: Sections can be moved
   3    In order to rearrange my course contents
   4    As a teacher
   5    I need to move sections up and down
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | [email protected] |
  11      And the following "courses" exist:
  12        | fullname | shortname | format | coursedisplay | numsections |
  13        | Course 1 | C1 | topics | 0 | 5 |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17      And I log in as "teacher1"
  18      And I follow "Course 1"
  19      And I turn editing mode on
  20  
  21    Scenario: Move up and down a section with Javascript disabled in a single page course
  22      Given I add a "Forum" to section "1" and I fill the form with:
  23        | Forum name | Test forum name |
  24        | Description | Test forum description |
  25      When I move down section "1"
  26      Then I should see "Test forum name" in the "#section-2" "css_element"
  27      And I move up section "2"
  28      And I should see "Test forum name" in the "#section-1" "css_element"
  29  
  30    Scenario: Move up and down a section with Javascript disabled in the course home of a course using paged mode
  31      Given I click on "Edit settings" "link" in the "Administration" "block"
  32      And I set the following fields to these values:
  33        | Course layout | Show one section per page |
  34      And I press "Save changes"
  35      And I add a "Forum" to section "1" and I fill the form with:
  36        | Forum name | Test forum name |
  37        | Description | Test forum description |
  38      When I move down section "1"
  39      Then I should see "Test forum name" in the "#section-2" "css_element"
  40      And I move up section "2"
  41      And I should see "Test forum name" in the "#section-1" "css_element"
  42  
  43    Scenario: Sections can not be moved with Javascript disabled in a section page of a course using paged mode
  44      Given I click on "Edit settings" "link" in the "Administration" "block"
  45      And I set the following fields to these values:
  46        | Course layout | Show one section per page |
  47      And I press "Save changes"
  48      And I add a "Forum" to section "2" and I fill the form with:
  49        | Forum name | Test forum name |
  50        | Description | Test forum description |
  51      When I follow "Topic 2"
  52      Then "#section-1" "css_element" should not exist
  53      And "#section-3" "css_element" should not exist
  54      And "Move down" "link" should not exist
  55      And "Move up" "link" should not exist


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