Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Matching response data in any order #1094

Open
saw-jan opened this issue Jun 14, 2022 · 0 comments
Open

Matching response data in any order #1094

saw-jan opened this issue Jun 14, 2022 · 0 comments
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Jun 14, 2022

The following interaction tries to match the data elements in the provided order:

}).appendElement('data', '', data => {
data.appendElement('element', '', element => {
shareResponseOcsData(element, 0, 101, 1, resource)
.appendElement('token', '', fromProviderState('${token}', '5Bvt5fDajGxiV3P')) /* eslint-disable-line no-template-curly-in-string */
})
data.appendElement('element', '', element => {
shareResponseOcsData(element, 1, 102, 1, resource)
.appendElement('token', '', fromProviderState('${token}', '6Bvt5fDajGxiV3Q')) /* eslint-disable-line no-template-curly-in-string */
})
data.appendElement('element', '', element => {
shareResponseOcsData(element, 3, 103, 1, resource)
.appendElement('token', '', fromProviderState('${token}', '7Bvt5fDajGxiV3R')) /* eslint-disable-line no-template-curly-in-string */
})
})

The server must respond with exactly the same structure and order in order for tests to pass. But the server can respond with the correct data but in different orders so, the tests should not matter the order of the data elements.

[TASK] We need a way to assert the data elements in any order so that the server can respond with data in any order.

Tests:

it('checking method : getShares for shared folder', async function () {

it('checking method : getShares for shared file', async function () {

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

No branches or pull requests

1 participant