1 |
efrain |
1 |
@tool @tool_oauth2 @javascript
|
|
|
2 |
|
|
|
3 |
Feature: OAuth2 user profile fields functionality
|
|
|
4 |
In order to use them later for authentication or repository plugins
|
|
|
5 |
As an administrator
|
|
|
6 |
I need to be able to map data fields provided by an Oauth2 provider
|
|
|
7 |
to custom user profile fields defined by an administrator.
|
|
|
8 |
|
|
|
9 |
Background:
|
|
|
10 |
Given the following "custom profile fields" exist:
|
|
|
11 |
| datatype | shortname | name | locked |
|
|
|
12 |
| text | unlocked_field | Unlocked field | 0 |
|
|
|
13 |
| text | locked_field | Locked field | 1 |
|
|
|
14 |
And I log in as "admin"
|
|
|
15 |
And I navigate to "Server > OAuth 2 services" in site administration
|
|
|
16 |
|
|
|
17 |
Scenario: Verify custom user profile field mapping
|
|
|
18 |
Given I press "Microsoft"
|
|
|
19 |
And I should see "Create new service: Microsoft"
|
|
|
20 |
And I set the following fields to these values:
|
|
|
21 |
| Name | Testing service |
|
|
|
22 |
| Client ID | thisistheclientid |
|
|
|
23 |
| Client secret | supersecret |
|
|
|
24 |
When I press "Save changes"
|
|
|
25 |
Then I should see "Changes saved"
|
|
|
26 |
And I should see "Testing service"
|
|
|
27 |
And I click on "Configure user field mappings" "link" in the "Testing service" "table_row"
|
|
|
28 |
|
|
|
29 |
# Create unlocked field
|
|
|
30 |
And I click on "Create new user field mapping for issuer \"Testing service\"" "button"
|
|
|
31 |
And I set the following fields to these values:
|
|
|
32 |
| External field name | External unlocked |
|
|
|
33 |
| Internal field name | Unlocked field |
|
|
|
34 |
And I click on "Save changes" "button"
|
|
|
35 |
And I should see "unlocked_field"
|
|
|
36 |
|
|
|
37 |
# Create locked field
|
|
|
38 |
And I click on "Create new user field mapping for issuer \"Testing service\"" "button"
|
|
|
39 |
And I set the following fields to these values:
|
|
|
40 |
| External field name | External locked |
|
|
|
41 |
| Internal field name | Locked field |
|
|
|
42 |
And I click on "Save changes" "button"
|
|
|
43 |
And I should see "locked_field"
|