| 1 | 
           efrain | 
           1 | 
           @media @media_videojs @_file_upload
  | 
        
        
            | 
            | 
           2 | 
           Feature: Embed videos without the media filter
  | 
        
        
            | 
            | 
           3 | 
             In order to add helpful resources for students
  | 
        
        
            | 
            | 
           4 | 
             As a teacher
  | 
        
        
            | 
            | 
           5 | 
             I need to be able to embed videos URL, file and lesson modules
  | 
        
        
            | 
            | 
           6 | 
              | 
        
        
            | 
            | 
           7 | 
             Background:
  | 
        
        
            | 
            | 
           8 | 
               Given I log in as "admin"
  | 
        
        
            | 
            | 
           9 | 
               And I am on site homepage
  | 
        
        
            | 
            | 
           10 | 
               And I turn editing mode on
  | 
        
        
            | 
            | 
           11 | 
              | 
        
        
            | 
            | 
           12 | 
             @javascript
  | 
        
        
            | 
            | 
           13 | 
             Scenario: Add a video in a URL resource. Make sure media filters work
  | 
        
        
            | 
            | 
           14 | 
               Given the following "activity" exists:
  | 
        
        
            | 
            | 
           15 | 
                 | activity    | url                                                        |
  | 
        
        
            | 
            | 
           16 | 
                 | course      | Acceptance test site                                       |
  | 
        
        
            | 
            | 
           17 | 
                 | name        | Video URL                                                  |
  | 
        
        
            | 
            | 
           18 | 
                 | intro       | Example of a video url                                     |
  | 
        
        
            | 
            | 
           19 | 
                 | externalurl | http://download.moodle.org/mediatest/quicktime_320_180.mov |
  | 
        
        
            | 
            | 
           20 | 
                 | section     | 1                                                          |
  | 
        
        
            | 
            | 
           21 | 
               When I am on the "Video URL" "url activity" page
  | 
        
        
            | 
            | 
           22 | 
               Then ".video-js" "css_element" should exist
  | 
        
        
            | 
            | 
           23 | 
               And I am on site homepage
  | 
        
        
            | 
            | 
           24 | 
              | 
        
        
            | 
            | 
           25 | 
             @javascript
  | 
        
        
            | 
            | 
           26 | 
             Scenario: Add a video as a File resource. Make sure media filters work
  | 
        
        
            | 
            | 
           27 | 
               When I add a "File" to section "1" using the activity chooser
  | 
        
        
            | 
            | 
           28 | 
               And I set the following fields to these values:
  | 
        
        
            | 
            | 
           29 | 
                 | Name | Video File |
  | 
        
        
            | 
            | 
           30 | 
                 | Description | Example of a video file |
  | 
        
        
            | 
            | 
           31 | 
               And I upload "media/player/videojs/tests/fixtures/test.mov" file to "Select files" filemanager
  | 
        
        
            | 
            | 
           32 | 
               And I press "Save and display"
  | 
        
        
            | 
            | 
           33 | 
               Then ".video-js" "css_element" should exist
  | 
        
        
            | 
            | 
           34 | 
              | 
        
        
            | 
            | 
           35 | 
             @javascript
  | 
        
        
            | 
            | 
           36 | 
             Scenario: Add a video as content to a lesson. Make sure media filters work
  | 
        
        
            | 
            | 
           37 | 
               Given the following "activities" exist:
  | 
        
        
            | 
            | 
           38 | 
                 | activity | course               | section | name              |
  | 
        
        
            | 
            | 
           39 | 
                 | lesson   | Acceptance test site | 1       | Lesson with video |
  | 
        
        
            | 
            | 
           40 | 
               When I am on the "Lesson with video" "lesson activity editing" page
  | 
        
        
            | 
            | 
           41 | 
               And I expand all fieldsets
  | 
        
        
            | 
            | 
           42 | 
               And I upload "media/player/videojs/tests/fixtures/test.mov" file to "Linked media" filemanager
  | 
        
        
            | 
            | 
           43 | 
               And I press "Save and display"
  | 
        
        
            | 
            | 
           44 | 
               And I follow "Add a content page"
  | 
        
        
            | 
            | 
           45 | 
               And I set the following fields to these values:
  | 
        
        
            | 
            | 
           46 | 
                 | Page title | Placeholder content |
  | 
        
        
            | 
            | 
           47 | 
                 | Description | Just so we can preview the lesson |
  | 
        
        
            | 
            | 
           48 | 
               And I press "Save page"
  | 
        
        
            | 
            | 
           49 | 
               And I am on site homepage
  | 
        
        
            | 
            | 
           50 | 
               And I follow "Lesson"
  | 
        
        
            | 
            | 
           51 | 
               And I follow "Click here to view"
  | 
        
        
            | 
            | 
           52 | 
               And I switch to "lessonmediafile" window
  | 
        
        
            | 
            | 
           53 | 
               Then ".video-js" "css_element" should exist
  | 
        
        
            | 
            | 
           54 | 
               And I switch to the main window
  |