Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_backup @core_contentbank @core_h5p @contenttype_h5p @_file_upload @javascript
2
Feature: Import course content bank content
3
  In order to import content from a course contentbank
4
  As a teacher
5
  I need to confirm that errors will not happen
6
 
7
  Background:
8
    Given I log in as "admin"
9
    And the following config values are set as admin:
10
      | unaddableblocks | | theme_boost|
11
    And I am on site homepage
12
    And I turn editing mode on
13
    And I add the "Navigation" block if not present
14
    And I configure the "Navigation" block
15
    And I set the following fields to these values:
16
      | Page contexts | Display throughout the entire site |
17
    And I press "Save changes"
18
    And I navigate to "H5P > Manage H5P content types" in site administration
19
    And I upload "h5p/tests/fixtures/ipsums.h5p" file to "H5P content type" filemanager
20
    And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
21
    And the following "courses" exist:
22
      | fullname | shortname | category |
23
      | Course 1 | C1        | 0        |
24
      | Course 2 | C2        | 0        |
25
    And the following "users" exist:
26
      | username | firstname | lastname | email |
27
      | teacher1 | Teacher | 1 | teacher1@example.com |
28
    And the following "course enrolments" exist:
29
      | user | course | role |
30
      | teacher1 | C1 | editingteacher |
31
      | teacher1 | C2 | editingteacher |
32
    And the following "contentbank content" exist:
33
      | contextlevel | reference | contenttype     | user     | contentname | filepath                        |
34
      | Course       | C1        | contenttype_h5p | teacher1 | ipsums.h5p  | /h5p/tests/fixtures/ipsums.h5p  |
35
    And I log out
36
    And I log in as "teacher1"
37
 
38
  Scenario: Import content bank content to another course
39
    Given I am on "Course 2" course homepage
40
    And I expand "Site pages" node
41
    And I click on "Content bank" "link"
42
    And I should not see "ipsums.h5p"
43
    When I import "Course 1" course into "Course 2" course using this options:
44
    And I expand "Site pages" node
45
    And I click on "Content bank" "link"
46
    Then I should see "ipsums.h5p"
47
    And I am on "Course 1" course homepage
48
    And I expand "Site pages" node
49
    And I click on "Content bank" "link"
50
    And I should see "ipsums.h5p"
51
 
52
  Scenario: User could configure not to import content bank
53
    Given I am on "Course 2" course homepage
54
    And I expand "Site pages" node
55
    And I click on "Content bank" "link"
56
    And I should not see "ipsums.h5p"
57
    When I import "Course 1" course into "Course 2" course using this options:
58
      | Initial | Include content bank content | 0 |
59
    And I expand "Site pages" node
60
    And I click on "Content bank" "link"
61
    Then I should not see "ipsums.h5p"
62
    And I am on "Course 1" course homepage
63
    And I expand "Site pages" node
64
    And I click on "Content bank" "link"
65
    And I should see "ipsums.h5p"