[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/lti/tests/behat/ -> addtype.feature (source)

   1  @mod @mod_lti
   2  Feature: Add preconfigured tools via teacher interface
   3    In order to provide reusable activities for teachers
   4    As a teacher
   5    I need to be able to add preconfigured tools
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email                |
  10        | teacher1 | Terry1    | Teacher1 | teacher1@example.com |
  11      And the following "courses" exist:
  12        | fullname | shortname | category |
  13        | Course 1 | C1 | 0 |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17  
  18    @javascript
  19    Scenario: Add a tool from a cartridge
  20      When I log in as "teacher1"
  21      And I follow "Course 1"
  22      And I turn editing mode on
  23      And I add a "External tool" to section "1" and I fill the form with:
  24        | Activity name | Test tool activity 1 |
  25      And I open "Test tool activity 1" actions menu
  26      And I follow "Edit settings" in the open menu
  27      And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
  28      And I press "Save and return to course"
  29      And I open "Test tool activity 1" actions menu
  30      And I follow "Edit settings" in the open menu
  31      And I expand all fieldsets
  32      Then the field "Launch/cartridge URL" matches value "http://www.example.com/lti/provider.php"
  33      And the field "Secure launch URL" matches value "https://www.example.com/lti/provider.php"
  34      And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg"
  35      And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg"
  36  
  37    @javascript
  38    Scenario: Add a preconfigured tool from a cartridge
  39      When I log in as "teacher1"
  40      And I follow "Course 1"
  41      And I turn editing mode on
  42      And I add a "External tool" to section "1" and I fill the form with:
  43        | Activity name | Test tool activity 1 |
  44      And I open "Test tool activity 1" actions menu
  45      And I follow "Edit settings" in the open menu
  46      And I follow "Add preconfigured tool"
  47      And I switch to "add_tool" window
  48      And I set the field "Tool name" to "Placeholder"
  49      And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
  50      And I press "Save changes"
  51      And I switch to the main window
  52      And I wait "2" seconds
  53      And I follow "Edit preconfigured tool"
  54      And I switch to "edit_tool" window
  55      Then the field "Tool base URL/cartridge URL" matches value "http://www.example.com/lti/provider.php"
  56      And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg"
  57      And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg"
  58      And I press "Cancel"
  59      And I switch to the main window
  60  
  61    @javascript
  62    Scenario: Add and use a preconfigured tool
  63      When I log in as "teacher1"
  64      And I follow "Course 1"
  65      And I turn editing mode on
  66      And I add a "External tool" to section "1" and I fill the form with:
  67        | Activity name | Test tool activity 1 |
  68      And I open "Test tool activity 1" actions menu
  69      And I follow "Edit settings" in the open menu
  70      And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
  71      And I press "Save and return to course"
  72      And I follow "Test tool activity 1"
  73      And I switch to "contentframe" iframe
  74      And I should see "This represents a tool provider"


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