Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_multiblock @javascript
2
Feature: Tabbed layout
3
    In order to streamline course presentation
4
    As a teacher
5
    I need to be able to focus content with a tabbed layout
6
 
7
  Scenario: Testing tabbed layout
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | One      | teacher@example.com  |
11
      | student1 | Student   | User     | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname |
14
      | Course 1 | C1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    When I log in as "teacher1"
20
    And I am on "Course 1" course homepage with editing mode on
21
    # The usual 'And I add "Multiblock" block' step can fail in JS with lots of blocks present.
22
    And I add the "Multiblock" block
23
    And I configure the "Multiblock" block
24
    And I set the field "Multiblock presentation style" to "Tabs"
25
    And I press "Save changes"
26
    And I manage the contents of "Multiblock" block
27
    And I expand all fieldsets
28
    And I add the HTML block field
29
    And I set the title of the HTML block to "First Item"
30
    And I set the field "Content" to "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
31
    And I press "Save and return to manage"
32
    And I expand all fieldsets
33
    And I add the HTML block field
34
    And I set the title of the HTML block to "Second Item"
35
    And I set the field "Content" to "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
36
    And I press "Save and return to manage"
37
    And I log out
38
    And I log in as "student1"
39
    And I am on "Course 1" course homepage
40
    Then I should see "First Item" in the ".block_multiblock" "css_element"
41
    And I should see "Second Item" in the ".block_multiblock" "css_element"
42
    And I should see "Lorem ipsum dolor sit" in the ".block_multiblock" "css_element"
43
    And I should not see "Ut enim ad minim veniam" in the ".block_multiblock" "css_element"
44
    And I click on "Second Item" "link"
45
    And I should not see "Lorem ipsum dolor sit" in the ".block_multiblock" "css_element"
46
    And I should see "Ut enim ad minim veniam" in the ".block_multiblock" "css_element"