Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly failure at apiActivities #10127

Open
amrita-shrestha opened this issue Sep 23, 2024 · 5 comments · May be fixed by #10135
Open

Nightly failure at apiActivities #10127

amrita-shrestha opened this issue Sep 23, 2024 · 5 comments · May be fixed by #10135
Assignees
Labels

Comments

@amrita-shrestha
Copy link
Contributor

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)
@micbar
Copy link
Contributor

micbar commented Sep 23, 2024

This is probably due to new translations.

Can we test only the original string?

@PrajwolAmatya
Copy link
Contributor

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

@PrajwolAmatya
Copy link
Contributor

Also in UI the activities are listed in English.

Screenshot from 2024-09-23 11-40-01

There was this similar issue #9856 related to activities being listed in English rather than the preferred language which was fixed.

@micbar
Copy link
Contributor

micbar commented Sep 23, 2024

@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.

  1. We could accept the challenge that the strings can change over night and adapt in the morning
  2. We could create a "testing" language in transifex? I don't know it that would be feasible
  3. Skip the language switch

@PrajwolAmatya
Copy link
Contributor

Overwriting custom translation path:
https://owncloud.dev/services/activitylog/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants