Skip to content

Commit

Permalink
add test to check activity after language translation
Browse files Browse the repository at this point in the history
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
  • Loading branch information
prashant-gurung899 committed Aug 21, 2024
1 parent 50d33b7 commit b02ffad
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions tests/acceptance/features/apiActivities/shareActivities.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1035,3 +1035,97 @@ Feature: check share activity
}
}
"""


Scenario: check activitiy message after language translation
Given user "Alice" has switched the system language to "de" using the Graph API
When user "Alice" lists the activities for file "textfile.txt" of space "Personal" using the 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": ["id","template","times"],
"properties": {
"id": {
"type": "string",
"pattern": "^%user_id_pattern%$"
},
"template": {
"type": "object",
"required": ["message","variables"],
"properties": {
"message": {
"const": "{user} hat {resource} zum {space} hinzugefügt"
},
"variables": {
"type": "object",
"required": ["resource","space","user"],
"properties": {
"resource": {
"type": "object",
"required": ["id","name"],
"properties": {
"id": {
"type": "string",
"pattern": "%file_id_pattern%"
},
"name": {
"const": "textfile.txt"
}
}
},
"space": {
"type": "object",
"required": ["id","name"],
"properties": {
"id": {
"type": "string",
"pattern": "^%user_id_pattern%!%user_id_pattern%$"
},
"name": {
"const": "Alice Hansen"
}
}
},
"user": {
"type": "object",
"required": ["id","displayName"],
"properties": {
"id": {
"type": "string",
"pattern": "%user_id_pattern%"
},
"displayName": {
"const": "Alice"
}
}
}
}
}
}
},
"times": {
"type": "object",
"required": ["recordedTime"],
"properties": {
"recordedTime": {
"type": "string",
"format": "date-time"
}
}
}
}
}
}
}
}
"""

0 comments on commit b02ffad

Please sign in to comment.