1 |
efrain |
1 |
@mod @mod_lti
|
|
|
2 |
Feature: Configure tool types
|
|
|
3 |
In order to allow teachers to add external LTI tools
|
|
|
4 |
As an admin
|
|
|
5 |
I need to be able to add, remove and configure tool types
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
|
|
|
10 |
|
|
|
11 |
@javascript
|
|
|
12 |
Scenario: Add a tool type from a cartridge URL
|
|
|
13 |
When I set the field "url" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
|
|
|
14 |
And I press "Add Legacy LTI"
|
|
|
15 |
Then I should see "Enter your consumer key and shared secret"
|
|
|
16 |
And I press "Save changes"
|
|
|
17 |
And I should see "Example tool"
|
|
|
18 |
|
|
|
19 |
@javascript
|
|
|
20 |
Scenario: Try to add a non-existant cartridge
|
|
|
21 |
When I set the field "url" to local url "/mod/lti/tests/fixtures/nonexistant.xml"
|
|
|
22 |
And I press "Add Legacy LTI"
|
|
|
23 |
Then I should see "Enter your consumer key and shared secret"
|
|
|
24 |
And I press "Save changes"
|
|
|
25 |
And I should see "Failed to create new tool. Please check the URL and try again."
|
|
|
26 |
|
|
|
27 |
@javascript
|
|
|
28 |
Scenario: Attempt to add a tool type from a configuration URL, then cancel
|
|
|
29 |
When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
|
|
30 |
And I press "Add Legacy LTI"
|
|
|
31 |
Then I should see "Cancel"
|
|
|
32 |
And I press "cancel-external-registration"
|