Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_h5pactivity
2
Feature: Duplicate and delete a h5pactivity
3
  In order to quickly create and delete h5p activities
4
  As a teacher
5
  I need to duplicate or delete h5pactivity inside the same course
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname |
10
      | Course 1 | C1        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com |
14
    And the following "course enrolments" exist:
15
      | user     | course | role           |
16
      | teacher1 | C1     | editingteacher |
17
 
18
  Scenario: Duplicate and delete h5p activity
19
    Given the following "activities" exist:
20
      | activity    | course | name           | packagefilepath                      |
21
      | h5pactivity | C1     | H5P Activity 1 | h5p/tests/fixtures/filltheblanks.h5p |
22
    And I am on the "H5P Activity 1" "h5pactivity activity" page logged in as teacher1
23
    # Initial confirmation that no error occurs when viewing h5p activity
24
    And I should see "You are in preview mode."
25
    And I am on "Course 1" course homepage with editing mode on
26
    # Duplicate the h5p activity
27
    When I duplicate "H5P Activity 1" activity
28
    # Confirm that h5p activity was duplicated successfully
29
    Then I should see "H5P Activity 1 (copy)"
30
    And I am on the "H5P Activity 1 (copy)" "h5pactivity activity" page
31
    # Confirm there are no errors when viewing duplicate h5p activity
32
    And I should see "You are in preview mode."
33
    And I am on the "Course 1" course page
34
    # Delete the duplicate h5p activity
35
    And I delete "H5P Activity 1 (copy)" activity
36
    # Confirm duplicate was deleted successfully
37
    And I should not see "H5P Activity 1 (copy)"
38
    And I am on the "H5P Activity 1" "h5pactivity activity" page
39
    # Confirm there are no errors on the original h5p activity after deleting the duplicate
40
    And I should see "You are in preview mode."