Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 15... Línea 15...
15
    And I open my profile in edit mode
15
    And I open my profile in edit mode
16
    When I click on the "Image" button for the "Description" TinyMCE editor
16
    When I click on the "Image" button for the "Description" TinyMCE editor
17
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
17
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
18
    Then "File picker" "dialogue" should exist
18
    Then "File picker" "dialogue" should exist
Línea -... Línea 19...
-
 
19
 
-
 
20
  Scenario: Focus returns to the correct location after closing a nested FilePicker
-
 
21
    Given I log in as "admin"
-
 
22
    And I open my profile in edit mode
-
 
23
    When I click on the "Image" button for the "Description" TinyMCE editor
-
 
24
    And I press "Browse repositories"
-
 
25
    When I press the escape key
-
 
26
    Then the focused element is "Browse repositories" "button"
19
 
27
 
20
  @_file_upload @test_tiny
28
  @_file_upload @test_tiny
21
  Scenario: Browsing repositories in the TinyMCE editor shows the FilePicker and upload url image
29
  Scenario: Browsing repositories in the TinyMCE editor shows the FilePicker and upload url image
22
    Given I log in as "admin"
30
    Given I log in as "admin"
23
    And I open my profile in edit mode
31
    And I open my profile in edit mode
Línea 62... Línea 70...
62
    When I select the "img" element in position "0" of the "Description" TinyMCE editor
70
    When I select the "img" element in position "0" of the "Description" TinyMCE editor
63
    And I click on the "Image" button for the "Description" TinyMCE editor
71
    And I click on the "Image" button for the "Description" TinyMCE editor
64
    Then the field "Custom size" matches value "1"
72
    Then the field "Custom size" matches value "1"
65
    And the field "Width" matches value "102"
73
    And the field "Width" matches value "102"
66
    And the field "Keep proportion" matches value "0"
74
    And the field "Keep proportion" matches value "0"
-
 
75
 
-
 
76
  @_file_upload
-
 
77
  Scenario: Set the alt text to the maximum and below the maximum length
-
 
78
    Given I log in as "admin"
-
 
79
    And I open my profile in edit mode
-
 
80
    And I click on the "Image" button for the "Description" TinyMCE editor
-
 
81
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
-
 
82
    And I upload "/lib/editor/tiny/tests/behat/fixtures/tinyscreenshot.png" to the file picker for TinyMCE
-
 
83
    When I set the field "How would you describe this image to someone who can't see it?" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet."
-
 
84
    Then I should see "750" in the "#currentcount" "css_element"
-
 
85
    And I set the field "How would you describe this image to someone who can't see it?" to "Lorem ipsum dolor sit amet."
-
 
86
    And I should see "27" in the "#currentcount" "css_element"
-
 
87
 
-
 
88
  @javascript
-
 
89
  Scenario: Permissions can be configured to control access to media
-
 
90
    Given the following "users" exist:
-
 
91
      | username | firstname | lastname | email                |
-
 
92
      | teacher1 | Teacher   | 1        | teacher1@example.com |
-
 
93
      | teacher2 | Teacher   | 2        | teacher2@example.com |
-
 
94
    And the following "courses" exist:
-
 
95
      | fullname | shortname | format |
-
 
96
      | Course 1 | C1        | topics |
-
 
97
    And the following "roles" exist:
-
 
98
      | name           | shortname | description         | archetype      |
-
 
99
      | Custom teacher | custom1   | Limited permissions | editingteacher |
-
 
100
    And the following "course enrolments" exist:
-
 
101
      | user     | course | role           |
-
 
102
      | teacher1 | C1     | editingteacher |
-
 
103
      | teacher2 | C1     | custom1        |
-
 
104
    And the following "activity" exists:
-
 
105
      | activity | assign          |
-
 
106
      | course   | C1              |
-
 
107
      | name     | Test assignment |
-
 
108
    And the following "permission overrides" exist:
-
 
109
      | capability     | permission | role    | contextlevel | reference |
-
 
110
      | tiny/media:use | Prohibit   | custom1 | Course       | C1        |
-
 
111
    # Check plugin access as a role with prohibited permissions.
-
 
112
    And I log in as "teacher2"
-
 
113
    And I am on the "Test assignment" Activity page
-
 
114
    And I navigate to "Settings" in current page administration
-
 
115
    When I click on the "Insert" menu item for the "Activity instructions" TinyMCE editor
-
 
116
    Then I should not see "Multimedia"
-
 
117
    # Check plugin access as a role with allowed permissions.
-
 
118
    And I log in as "teacher1"
-
 
119
    And I am on the "Test assignment" Activity page
-
 
120
    And I navigate to "Settings" in current page administration
-
 
121
    And I click on the "Insert" menu item for the "Activity instructions" TinyMCE editor
-
 
122
    And I should see "Multimedia"