[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/lesson/tests/behat/ -> import_images.feature (source)

   1  @mod @mod_lesson
   2  Feature: In a lesson activity, teacher can import embedded images in questions answers and responses
   3    As a teacher
   4    I need to import a question with images in answers and responses in a lesson
   5  
   6    @javascript @_file_upload
   7    Scenario: Import questions with images in answers and responses in a lesson
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11        | student1 | Student | 1 | student1@example.com |
  12      And the following "courses" exist:
  13        | fullname | shortname | category |
  14        | Course 1 | C1 | 0 |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19      And I log in as "teacher1"
  20      When I am on homepage
  21      And I follow "Course 1"
  22      And I turn editing mode on
  23      And I add a "Lesson" to section "1" and I fill the form with:
  24        | Name | Test lesson name |
  25        | Description | Test lesson description |
  26      And I follow "Test lesson name"
  27      And I follow "Import questions"
  28      And I set the field "File format" to "Moodle XML format"
  29      And I upload "mod/lesson/tests/fixtures/multichoice.xml" file to "Upload" filemanager
  30      And I press "Import"
  31      Then I should see "Importing 1 questions"
  32      And I should see "bonjour.mp3"
  33      And I should see "What language is being spoken?"
  34      And I press "Continue"
  35      And I should see "What language is being spoken?"
  36      And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'pluginfile.php')]" "xpath_element" should exist
  37      And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'flag-france.jpg')]" "xpath_element" should exist
  38  


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1