test(api): adjust user search tests expectation
This commit is contained in:
@@ -298,7 +298,6 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"onPremisesSamAccountName",
|
||||
"drive",
|
||||
"accountEnabled",
|
||||
@@ -313,10 +312,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["brian@example.org"]
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"enum": ["Brian"]
|
||||
@@ -428,7 +423,6 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"onPremisesSamAccountName",
|
||||
"drive",
|
||||
"accountEnabled",
|
||||
@@ -443,10 +437,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["brian@example.org"]
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"enum": ["Brian"]
|
||||
@@ -567,7 +557,6 @@ Feature: get users
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"mail",
|
||||
"onPremisesSamAccountName"
|
||||
],
|
||||
"properties": {
|
||||
@@ -575,10 +564,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["brian@example.org"]
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"enum": ["Brian"]
|
||||
@@ -1352,6 +1337,50 @@ Feature: get users
|
||||
|
||||
|
||||
Scenario: non-admin user searches other users by display name
|
||||
When user "Brian" searches for user "ali" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"enum": ["Alice Hansen"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"enum": ["Member"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
@env-config
|
||||
Scenario: non-admin user searches other users by display name (OCIS_SHOW_USER_EMAIL_IN_RESULTS enabled)
|
||||
Given the config "OCIS_SHOW_USER_EMAIL_IN_RESULTS" has been set to "true"
|
||||
When user "Brian" searches for user "ali" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
@@ -1480,7 +1509,6 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1492,10 +1520,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["alice@example.org"]
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"enum": ["Member"]
|
||||
@@ -1529,7 +1553,6 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1541,10 +1564,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["alice@example.org"]
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"enum": ["Member"]
|
||||
@@ -1560,10 +1579,9 @@ Feature: get users
|
||||
Scenario: non-admin user searches for multiple users having same displayname
|
||||
Given the user "Admin" has created a new user with the following attributes:
|
||||
| userName | another-alice |
|
||||
| displayName | Alice Hansen |
|
||||
| displayName | Alice Murphy |
|
||||
| email | another-alice@example.org |
|
||||
| password | containsCharacters(*:!;_+-&) |
|
||||
|
||||
When user "Brian" searches for user "alice" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
@@ -1586,7 +1604,6 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1598,10 +1615,6 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["alice@example.org"]
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"enum": ["Member"]
|
||||
@@ -1613,22 +1626,17 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"mail",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"enum": ["Alice Hansen"]
|
||||
"enum": ["Alice Murphy"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"mail": {
|
||||
"type": "string",
|
||||
"enum": ["another-alice@example.org"]
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"enum": ["Member"]
|
||||
|
||||
Reference in New Issue
Block a user