0

I'm trying to verify 'Total' contains a value other than NULL or 0

[
    {
        "payload": {
            "data": {
                "actor": {
                    "account": {
                        "nrql": {
                            "results": [
                                {
                                    "Total": 6
                                }
                            ]
                        }
                    }
                }
            }
        }
    }
]

Tried writing this:

expect(response.body.payload.data.actor.account.nrql.results[0]).have.property('Total').to.not.be.oneOf([null, "",0])

But keep getting error: Cannot read properties of undefined (reading 'data')

0 Answers0