Nightly failure at apiActivities
Describe the bug
Build fails at https://drone.owncloud.com/owncloud/ocis/39169/35/5
@issue-9856
Scenario: check activity message with different language # /drone/src/tests/acceptance/features/apiActivities/activities.feature:1236
Given user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has switched the system language to "de" using the Graph API # GraphContext::userHasSwitchedTheSystemLanguageUsingGraphApi()
When user "Alice" lists the activities for file "textfile.txt" of space "Personal" using the Graph API # GraphContext::userListsTheActivitiesForResourceOfSpaceUsingTheGraphAPI()
Then the HTTP status code should be "200" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And the JSON data of the response should match # FeatureContext::theJsonDataOfTheResponseShouldMatch()
"""
{
"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} zu {folder} 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"
}
}
}
}
}
}
}
}
"""
Const failed at #->properties:value->items[0]:0->properties:template->properties:message (Swaggest\JsonSchema\Exception\ConstException)
This is probably due to new translations.
Can we test only the original string?
Can we test only the original string?
The message in the response is returned in English rather than the preferred language. What do you mean by the original string? Do you mean to test the message in English? @micbar
Also in UI the activities are listed in English.
There was this similar issue https://github.com/owncloud/ocis/issues/9856 related to activities being listed in English rather than the preferred language which was fixed.
@PrajwolAmatya
In this particular test, the language is switched to de in a GIVEN step.
Tonight, somebody changed the german translation of that string, so that it fails during the nightly run.
@dragonchaser @kulmann we should think about the translation tests IMHO.
- We could accept the challenge that the strings can change over night and adapt in the morning
- We could create a "testing" language in transifex? I don't know it that would be feasible
- Skip the language switch
Overwriting custom translation path: https://owncloud.dev/services/activitylog/