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

Matching contains array of objects to array of objects #974

Closed
si-mikey opened this issue Nov 22, 2019 · 1 comment
Closed

Matching contains array of objects to array of objects #974

si-mikey opened this issue Nov 22, 2019 · 1 comment
Labels

Comments

@si-mikey
Copy link

Hello,

I am trying to match the below and for some reason it does not pass.
Scenario:
parent is ACTUAL and cancelResponse.data.parent is EXPECTED

my question is why doesn't a json array of objects as the actual match a sub-set json array of objects?

all the keys and values in the expected are in the actual so contains should cover that.

* match parent contains ['#(cancelResponse.data.parent)']

```js
ACTUAL:
[{"num":"111111111111111111","Tdate":"2019-11-22","type":"cars",
"orig":"555555555555",
"tdate":"2019-11-22","part":3,"sessId":"777","evtTyp":"fly",
"src":"nyx","token":"hal","evtTs":"2019-11-22T13:27:58.246235000",
"orgt":"xx","ord":"bba",
"loren":"dim","lao":"foo","car":"234234234",
"order":"6621","ordback":"1","ordTyp":"1","ordCpcty":"A"}]

 EXPECTED:
 [{"num":"111111111111111111",
"Tdate":"2019-11-22","type":"cars",
"orig":"555555555555"}], 

reason: actual value does not contain expected
@ptrthomas
Copy link
Member

ptrthomas commented Nov 23, 2019

@si-mikey sorry I can't understand your question as it is incomplete. but first can you read this issue (and the linked issues) to see if that answers your question: #925

we prefer questions like this on Stack Overflow, but if you insist, follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

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

No branches or pull requests

2 participants