Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
11 efrain 1
@core @core_contentbank @core_h5p @contentbank_h5p @javascript
1 efrain 2
Feature: Store the content bank view preference
3
  In order to consistantly view the content bank in icons or details view
4
  As an admin
5
  I need to be able to store my view preference
6
 
7
  Background:
11 efrain 8
    Given the following "user private files" exist:
9
      | user  | filepath                             |
10
      | admin | h5p/tests/fixtures/filltheblanks.h5p |
11
      | admin | h5p/tests/fixtures/greeting-card.h5p |
1 efrain 12
    And I log in as "admin"
13
    And I am on site homepage
14
    And I turn editing mode on
15
    And the following config values are set as admin:
16
      | unaddableblocks | | theme_boost|
17
    And I add the "Navigation" block if not present
18
    And I configure the "Navigation" block
19
    And I set the following fields to these values:
20
      | Page contexts | Display throughout the entire site |
21
    And I press "Save changes"
22
    And I expand "Site pages" node
23
    And I click on "Content bank" "link"
24
    And I click on "Upload" "link"
25
    And I click on "Choose a file..." "button"
26
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
27
    And I click on "filltheblanks.h5p" "link"
28
    And I set the field "Save as" to "fib.h5p"
29
    And I click on "Select this file" "button"
30
    And I click on "Save changes" "button"
31
    And I click on "Content bank" "link"
32
    And I click on "Upload" "link"
33
    And I click on "Choose a file..." "button"
34
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
35
    And I click on "greeting-card.h5p" "link"
36
    And I set the field "Save as" to "greetingcard.h5p"
37
    And I click on "Select this file" "button"
38
    And I click on "Save changes" "button"
39
 
40
  Scenario: There are several views for displaying contents into the content bank
41
    Given I am on site homepage
42
    And I expand "Site pages" node
43
    And I click on "Content bank" "link"
44
    When I click on "Display content bank with file details" "button"
45
    Then I should see "Last modified"
46
    And I follow "greetingcard.h5p"
47
    And I click on "Content bank" "link"
48
    And I should see "Last modified"
49
    And I click on "Display content bank with icons" "button"
50
    And I follow "greetingcard.h5p"
51
    And I click on "Content bank" "link"
52
    And I should not see "Last modified"
53
 
54
  Scenario: Display the number of times a content is used in file details view
11 efrain 55
    Given I am on the "My private files" page
1 efrain 56
    And I click on "Add..." "button"
57
    And I select "Content bank" repository in file picker
58
    And I click on "fib.h5p" "file" in repository content area
59
    And I click on "Link to the file" "radio"
60
    And I click on "Select this file" "button"
61
    And I click on "Save changes" "button"
62
    When I am on site homepage
63
    And I expand "Site pages" node
64
    And I click on "Content bank" "link"
65
    And I click on "Display content bank with file details" "button"
66
    Then I should see "1" in the "[data-file='fib.h5p'] .cb-uses" "css_element"
67
    And I should see "0" in the "[data-file='greetingcard.h5p'] .cb-uses" "css_element"