Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_admin @core_webservice
2
Feature: Web service user settings
3
  In order to configure authorised users for a web service
4
  As an admin
5
  I need to use the page that lets you do that
6
 
7
  Background:
8
    # Include a custom profile field so we can check it gets displayed
9
    Given the following "custom profile fields" exist:
10
      | datatype | shortname | name           | param2 |
11
      | text     | frog      | Favourite frog | 100    |
12
    And the following config values are set as admin:
13
      | showuseridentity | email,profile_field_frog |
14
    And the following "users" exist:
15
      | username | firstname | lastname | email         | profile_field_frog |
16
      | user1    | User      | One      | 1@example.org | Kermit             |
17
    And the following "core_webservice > Service" exists:
18
      | name            | Silly service |
19
      | shortname       | silly         |
20
      | restrictedusers | 1             |
21
      | enabled         | 1             |
22
 
23
  Scenario: Add a user to a web service
24
    When I log in as "admin"
25
    And I navigate to "Server > Web services > External services" in site administration
26
    And I click on "Authorised users" "link" in the "Silly service" "table_row"
27
    And I set the field "Not authorised users" to "User One"
28
    And I press "Add"
29
    Then I should see "User One" in the ".alloweduserlist" "css_element"
30
    And I should see "1@example.org" in the ".alloweduserlist" "css_element"
31
    And I should see "Kermit" in the ".alloweduserlist" "css_element"
32
 
33
  @javascript
34
  Scenario: Add a function to a web service
35
    When I log in as "admin"
36
    And I navigate to "Server > Web services > External services" in site administration
37
    And I click on "Functions" "link" in the "Silly service" "table_row"
38
    And I follow "Add functions"
39
    And I set the field "Name" to "core_blog_get_entries"
40
    And I click on "Add functions" "button" in the "#fgroup_id_buttonar" "css_element"
41
    Then I should see "core_blog_get_entries" in the "generaltable" "table"