Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@enrol @enrol_lti
2
Feature: Check that the page listing the shared external tools is functioning as expected
3
  In order to edit an external tool
4
  As a teacher
5
  I need to ensure the tool listing page is working as expected
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | format |
13
      | Course 1 | C1 | topics |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "activities" exist:
18
      | activity | name                 | intro                    | course | idnumber  | section |
19
      | assign   | Test assignment name | Submit your online text  | C1     | assign1   | 1       |
20
    And I log in as "admin"
21
    And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration
22
    And I click on "Enable" "link" in the "Publish as LTI tool" "table_row"
23
    And I log out
24
 
25
  Scenario: I want to edit an external tool
26
    Given I log in as "teacher1"
27
    And I turn editing mode on
28
    And I am on the "Course 1" "enrolment methods" page
29
    And I select "Publish as LTI tool" from the "Add method" singleselect
30
    And I set the following fields to these values:
31
      | Custom instance name | Assignment - LTI |
32
      | Tool to be published | Test assignment name |
33
      | LTI version          | Legacy LTI (1.1/2.0) |
34
    And I press "Add method"
35
    And I am on "Course 1" course homepage
36
    And I navigate to "Published as LTI tools" in current page administration
37
    And I click on "Legacy LTI (1.1/2.0" "link"
38
    And I should see "Assignment - LTI" in the ".generaltable" "css_element"
39
    When I click on "Disable" "link" in the "Assignment - LTI" "table_row"
40
    Then ".dimmed_text" "css_element" should exist in the "Assignment - LTI" "table_row"
41
    And I click on "Enable" "link" in the "Assignment - LTI" "table_row"
42
    And ".dimmed_text" "css_element" should not exist in the "Assignment - LTI" "table_row"
43
    And I click on "Edit" "link" in the "Assignment - LTI" "table_row"
44
    And I set the following fields to these values:
45
      | Custom instance name | Course - LTI |
46
      | Tool to be published | Course |
47
    And I press "Save changes"
48
    And I should see "Course - LTI" in the ".generaltable" "css_element"
49
    And I click on "Delete" "link" in the "Course - LTI" "table_row"
50
    And I press "Cancel"
51
    And I should see "Course - LTI" in the ".generaltable" "css_element"
52
    And I click on "Delete" "link" in the "Course - LTI" "table_row"
53
    And I press "Continue"
54
    And I should see "No resources or activities are published yet"
55
    And I should not see "Course - LTI"