Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 1... Línea 1...
1
@mod @mod_h5pactivity @core_h5p @_file_upload @_switch_iframe @javascript @core_completion
1
@mod @mod_h5pactivity @core_h5p @_switch_iframe @core_completion
2
Feature: Pass grade activity completion information in the h5p activity
2
Feature: Completion of H5P activity by achieving a passing grade
-
 
3
  In order to complete an H5P activity
-
 
4
  As a student
-
 
5
  I need to be able to complete the h5p activity to receive a grade
Línea 3... Línea 6...
3
 
6
 
4
  Background:
7
  Background:
5
    Given the following "users" exist:
8
    Given the following "users" exist:
6
      | username | firstname | lastname | email                |
9
      | username | firstname | lastname | email                |
Línea 26... Línea 29...
26
      | completionusegrade  | 1                                    |
29
      | completionusegrade  | 1                                    |
27
      | completionpassgrade | 1                                    |
30
      | completionpassgrade | 1                                    |
28
      | gradepass           | 25                                   |
31
      | gradepass           | 25                                   |
29
      | packagefilepath     | h5p/tests/fixtures/filltheblanks.h5p |
32
      | packagefilepath     | h5p/tests/fixtures/filltheblanks.h5p |
Línea 30... Línea 33...
30
 
33
 
31
  Scenario: View automatic completion items
34
  Scenario: Verify that the h5p completion conditions are displayed to teachers
32
    # Teacher view.
35
    Given I change window size to "large"
33
    Given I am on the "Music history" "h5pactivity activity" page logged in as teacher1
36
    And I am on the "Music history" "h5pactivity activity" page logged in as teacher1
34
    And "Music history" should have the "View" completion condition
37
    Then "Music history" should have the "View" completion condition
35
    And "Music history" should have the "Receive a grade" completion condition
38
    And "Music history" should have the "Receive a grade" completion condition
-
 
39
    And "Music history" should have the "Receive a passing grade" completion condition
36
    And "Music history" should have the "Receive a passing grade" completion condition
40
 
37
    And I log out
41
  @javascript
-
 
42
  Scenario: Verify that students can complete an H5P activity by achieving a passing grade
38
    # Student view.
43
    # Student 1 attempt the H5P and fills the blanks with the wrong answers... needs more geography lessons!
39
    When I am on the "Music history" "h5pactivity activity" page logged in as student1
44
    Given I am on the "Music history" "h5pactivity activity" page logged in as student1
40
    And I switch to "h5p-player" class iframe
45
    And I switch to "h5p-player" class iframe
-
 
46
    And I switch to "h5p-iframe" class iframe
-
 
47
    And I should see "Of which countries are Berlin, Washington, Beijing, Canberra and Brasilia the capitals?"
-
 
48
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 1 of 4\")]" to "Rio de Janeiro"
-
 
49
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 2 of 4\")]" to "New York"
-
 
50
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 3 of 4\")]" to "Hamburg"
41
    And I switch to "h5p-iframe" class iframe
51
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 4 of 4\")]" to "Sydney"
-
 
52
    And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
42
    And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
53
    And I switch to the main frame
-
 
54
    And I reload the page
-
 
55
    And the "View" completion condition of "Music history" is displayed as "done"
-
 
56
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
-
 
57
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
-
 
58
 
43
    And I reload the page
59
    # Student 2 attempts the H5P and fills the blanks with the correct answers.
44
    And I am on the "Music history" "h5pactivity activity" page logged in as student2
60
    And I am on the "Music history" "h5pactivity activity" page logged in as student2
45
    And I switch to "h5p-player" class iframe
61
    And I switch to "h5p-player" class iframe
-
 
62
    And I switch to "h5p-iframe" class iframe
46
    And I switch to "h5p-iframe" class iframe
63
    And I should see "Of which countries are Berlin, Washington, Beijing, Canberra and Brasilia the capitals?"
47
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 1 of 4\")]" to "Brasilia"
64
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 1 of 4\")]" to "Brasilia"
48
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 2 of 4\")]" to "Washington"
65
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 2 of 4\")]" to "Washington"
49
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 3 of 4\")]" to "Berlin"
66
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 3 of 4\")]" to "Berlin"
50
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 4 of 4\")]" to "Canberra"
67
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 4 of 4\")]" to "Canberra"
51
    And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
68
    And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
52
    And I switch to the main frame
69
    And I switch to the main frame
53
    And I reload the page
-
 
54
    Then the "View" completion condition of "Music history" is displayed as "done"
-
 
55
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
-
 
56
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
-
 
57
    And I log out
-
 
58
    And I am on the "Music history" "h5pactivity activity" page logged in as student1
70
    And I reload the page
59
    And the "View" completion condition of "Music history" is displayed as "done"
71
    And the "View" completion condition of "Music history" is displayed as "done"
60
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
72
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
-
 
73
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
-
 
74
 
61
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
75
    # Teacher confirms which students have completed the H5P activity.
62
    And I am on the "Course 1" "course" page logged in as "teacher1"
76
    When I am on the "Course 1" "course" page logged in as "teacher1"
63
    And "Vinnie Student1" user has completed "Music history" activity
77
    Then "Vinnie Student1" user has completed "Music history" activity
64
    And "Vinnie Student2" user has completed "Music history" activity
78
    And "Vinnie Student2" user has completed "Music history" activity