Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign @assignfeedback @assignfeedback_editpdf @javascript @_file_upload
2
Feature: Ensure that a comment remains visible if its popup menu is open
3
  In order to insert quick list comments in the PDF editor
4
  As a teacher
5
  I need the comment to stay visible when its popup menu is open
6
 
7
  Background:
8
    Given ghostscript is installed
9
    And the following "courses" exist:
10
      | fullname | shortname | category | groupmode |
11
      | Course 1 | C1 | 0 | 1 |
12
    And the following "users" exist:
13
      | username | firstname | lastname | email |
14
      | teacher1 | Teacher | 1 | teacher1@example.com |
15
      | student1 | Student | 1 | student1@example.com |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
    And the following "activity" exists:
21
      | activity                            | assign                |
22
      | course                              | C1                    |
23
      | name                                | Test assignment name  |
24
      | assignsubmission_file_enabled       | 1                     |
25
      | assignsubmission_file_maxfiles      | 1                     |
26
      | assignsubmission_file_maxsizebytes  | 102400                |
27
      | assignfeedback_editpdf_enabled      | 1                     |
28
      | submissiondrafts                    | 0                     |
29
    And the following "mod_assign > submission" exists:
30
      | assign  | Test assignment name                                       |
31
      | user    | student1                                                   |
32
      | file    | mod/assign/feedback/editpdf/tests/fixtures/submission.pdf  |
33
 
34
    And I am on the "Test assignment name" Activity page logged in as teacher1
35
    And I follow "View all submissions"
36
    And I click on "Grade" "link" in the "Submitted for grading" "table_row"
37
    And I wait for the complete PDF to load
38
 
39
  Scenario: Add an empty comment and open its menu
40
    When I click on ".commentbutton" "css_element"
41
    And I draw on the pdf
42
    And I click on ".commentdrawable a" "css_element"
43
    Then ".drawingcanvas .commentdrawable" "css_element" should exist
44
 
45
  Scenario: Add text to a comment and open its menu
46
    When I click on ".commentbutton" "css_element"
47
    And I draw on the pdf
48
    And I set the field with xpath "//div[@class='commentdrawable']//textarea" to "Comment"
49
    And I click on ".commentdrawable a" "css_element"
50
    Then ".drawingcanvas .commentdrawable" "css_element" should exist
51
    And the "class" attribute of ".drawingcanvas .commentdrawable" "css_element" should not contain "commentcollapsed"