Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_contentbank @core_h5p @contentbank_h5p @_file_upload @javascript
2
Feature: Sort content in the content bank
3
  In order to temporarily organise the content of the content bank
4
  As an admin
5
  I need to be able to sort the content bank in various ways
6
 
7
  Background:
8
    Given I log in as "admin"
9
    And I navigate to "H5P > Manage H5P content types" in site administration
10
    And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
11
    And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
12
    And the following "users" exist:
13
      | username    | firstname | lastname | email              |
14
      | manager     | Max       | Manager  | man@example.com    |
15
    And the following "role assigns" exist:
16
      | user        | role      | contextlevel  | reference     |
17
      | manager     | manager       | System    |               |
18
    And the following "contentbank content" exist:
19
        | contextlevel | reference | contenttype       | user    | contentname          | filepath                                |
20
        | System       |           | contenttype_h5p   | admin   | Dragon_santjordi.h5p | /h5p/tests/fixtures/filltheblanks.h5p   |
21
        | System       |           | contenttype_h5p   | admin   | mathsbook.h5p        | /h5p/tests/fixtures/filltheblanks.h5p   |
22
        | System       |           | contenttype_h5p   | manager | historybook.h5p      | /h5p/tests/fixtures/filltheblanks.h5p   |
23
        | System       |           | contenttype_h5p   | admin   | santjordi.h5p        | /h5p/tests/fixtures/filltheblanks.h5p   |
24
        | System       |           | contenttype_h5p   | admin   | santjordi_rose.h5p   | /h5p/tests/fixtures/filltheblanks.h5p   |
25
        | System       |           | contenttype_h5p   | admin   | SantJordi_book       | /h5p/tests/fixtures/filltheblanks.h5p   |
26
 
27
  Scenario: Admins can order content in the content bank
28
    Given I am on site homepage
29
    And I turn editing mode on
30
    And the following config values are set as admin:
31
      | unaddableblocks | | theme_boost|
32
    And I add the "Navigation" block if not present
33
    And I expand "Site pages" node
34
    And I click on "Content bank" "link"
35
    When I click on "Display content bank with file details" "button"
36
    And I click on "Sort by Content name ascending" "button"
37
    And "Dragon_santjordi.h5p" "text" should appear before "historybook.h5p" "text"
38
    And "historybook.h5p" "text" should appear before "mathsbook.h5p" "text"
39
    And "SantJordi_book" "text" should appear before "santjordi_rose.h5p" "text"
40
    And I click on "Sort by Content name descending" "button"
41
    And "historybook.h5p" "text" should appear before "Dragon_santjordi.h5p" "text"
42
    And "mathsbook.h5p" "text" should appear before "historybook.h5p" "text"
43
    Then "santjordi_rose.h5p" "text" should appear before "SantJordi_book" "text"
44
 
45
  Scenario: Admins can order content depending on the author
46
    Given I am on site homepage
47
    And I turn editing mode on
48
    And the following config values are set as admin:
49
      | unaddableblocks | | theme_boost|
50
    And I add the "Navigation" block if not present
51
    And I expand "Site pages" node
52
    And I click on "Content bank" "link"
53
    When I click on "Display content bank with file details" "button"
54
    Then I click on "Sort by Author ascending" "button"
55
    And "Dragon_santjordi.h5p" "text" should appear before "historybook.h5p" "text"
56
    And "santjordi_rose.h5p" "text" should appear before "historybook" "text"
57
    And I click on "Sort by Author descending" "button"
58
    And "historybook.h5p" "text" should appear before "Dragon_santjordi.h5p" "text"
59
    And "historybook.h5p" "text" should appear before "santjordi_rose" "text"