Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_scorm
2
Feature: Scorm display options
3
  In order to set how Scorm is displayed
4
  As a teacher
5
  I need to be able to choose from Scorm package display options
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | One      | teacher1@example.com |
11
      | student1 | Student   | One      | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | format         | activitytype |
14
      | Course 1 | C1        | topics         |              |
15
      | Course 2 | C2        | singleactivity | scorm        |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | teacher1 | C1     | editingteacher |
19
      | student1 | C1     | student        |
20
      | teacher1 | C2     | editingteacher |
21
      | student1 | C2     | student        |
22
 
23
  @javascript
24
  Scenario Outline: Teacher can change to various Scorm package display options
25
    Given the following "activities" exist:
26
      | activity | course | name       | packagefilepath                                          | hidetoc | nav              |
27
      | scorm    | C1     | C1 Scorm 1 | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip | <toc>   | <shownavigation> |
28
    And I am on the "C1 Scorm 1" "scorm activity" page logged in as teacher1
29
    When I press "Preview"
30
    # Confirm TOC display
31
    # Used css_element to check > and < button display in TOC since similar buttons also exist in navigation
32
    Then I <tocdisplay> see "Golf Explained - Minimum Run-time Calls"
33
    And "[title='Show']" "css_element" <showdisplay> exist
34
    And "[title='Hide']" "css_element" <hidedisplay> exist
35
    # Confirm TOC dropdown display
36
    And "scoid" "select" <tocdropdown> exist
37
    # Confirm the navigation display
38
    And "[id='scorm_nav']" "css_element" <navbar> exist
39
 
40
    Examples:
41
      | toc | shownavigation | tocdisplay | showdisplay | hidedisplay | tocdropdown | navbar     |
42
      | 1   |                | should not | should      | should not  | should not  | should not |
43
      | 2   | 1              | should     | should      | should not  | should      | should not |
44
      | 0   | 0              | should     | should not  | should      | should not  | should not |
45
      | 0   | 1              | should     | should not  | should      | should not  | should     |
46
 
47
  Scenario: Student can exit Scorm activity in single activity course format
48
    Given the following "activities" exist:
49
      | activity | course | name       | packagefilepath                                          | popup |
50
      | scorm    | C2     | C2 Scorm 1 | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip | 0     |
51
    And I am on the "C2 Scorm 1" "scorm activity" page logged in as student1
52
    And I press "Enter"
53
    When I click on "Exit activity" "link"
54
    # Confirm that student can exit activity
55
    Then "Preview" "button" should exist
56
    And "Enter" "button" should exist
57
    And "Exit activity" "link" should not exist
58
    And I should not see "Golf Explained - Minimum Run-time Calls"