I have a question regarding the dynamic verification of Array elements. For my project, I need to suggest a price that will increase over time, and I require a script that can verify these elements dynamically. In the screenshot provided, you can see what needs to be verified. The script I used is as follows:
` describe('POST method', () => {
it('suggest a price', () => {
//Suggest a price you are willing to pay. Available only for auctionType: fixed_price
cy.request({
method: 'POST',
url:"xxxxxx",
headers:{
"Authorization":"LOOL",
"content-type": "application/json"
},
body: {
"id": "d42f516a867590633dd8a82cb2563437",
"bid": 6900,
"auctionPlatformId": "xxx",
"auctionPlatformUserId": 0
},
failOnStatusCode: false
})
expect(res.status).to.eq(200)
expect(res.body).to.have.property("id", "d42f516a867590633dd8a82cb2563437")
expect(res.body).to.have.property("amount", 6900)
expect(res.body).to.have.property("auctionPlatformId", "abc")
expect(res.body).to.have.property("auctionPlatformId", 0)`
However, this code lacks dynamism and does not perform the required verifications.