Skip to content

The containers.EnumerateChildren test fails when there aren't any child files. #115

@horacioj

Description

@horacioj

Hi,

The documentation says:

If there are no child files, this property should be an empty array.

The WOPI Host is returning:

{
  "ChildContainers": [
    {
      "Name": "some valid name 1",
      "Url": "some valid url 1"
    },
    {
      "Name": "some valid name 2",
      "Url": "some valid url 2"
    }
  ],
  "ChildFiles": []
}

However, the WOPI Validator fails with error:

Test group: EnumerateAncestorsAndChildren
  Fail: containers.EnumerateChildren
    EnumerateAncestors, response code: 200 OK
    EnumerateChildren, response code: 200 OK
      Incorrect value for 'ChildFiles[0].Name' property. Required property missing
      Incorrect value for 'ChildFiles[0].Url' property. Value is required but not provided.
      Incorrect value for 'ChildFiles[0].Version' property. Required property missing
      Incorrect value for 'ChildFiles[0].Size' property. Required property missing

I guess the same problem happens when running other tests too, because in the TestCases.xml I see many of these:

<Validators>
  <JsonResponseContentValidator>
	<StringProperty Name="ChildFiles[0].Name" IsRequired="true" />
	<AbsoluteUrlProperty Name="ChildFiles[0].Url" IsRequired="true" MustIncludeAccessToken="true" />
	<StringProperty Name="ChildFiles[0].Version" IsRequired="true" />
	<LongProperty Name="ChildFiles[0].Size" IsRequired="true" />
  </JsonResponseContentValidator>
</Validators>

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions