DEV Community

Discussion on: Loading and using a fixture from an API endpoint for Cypress e2e tests

Collapse
 
jprealini profile image
Juan Pablo

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?