I am modifying the content of a fixture before sending a POST request, but the item I create with the POST gets persisted with the original data... I am doing it like:
cy.fixture('fixture').then((fixture) => { fixture.body.title = "New title", cy.request({ method: 'POST' url: 'url', body: fixture }) })
Any idea what I'm missing?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am modifying the content of a fixture before sending a POST request, but the item I create with the POST gets persisted with the original data...
I am doing it like:
cy.fixture('fixture').then((fixture) => {
fixture.body.title = "New title",
cy.request({
method: 'POST'
url: 'url',
body: fixture
})
})
Any idea what I'm missing?