-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
I would like to be able to use setupScenario similar to cucumbers background steps. As the setupScenario calls the webrick server. I would like to know if it is possible for the backend to return a json response so i can use the generated factory_bot data in the front end e.g.
scenario :basic do
a = MyModel.create name: 'something'
# return as response that can be used in the POST below
respond_with a
end
cy
.request(
"POST",
Cypress.env("CALLBACK"),
JSON.stringify({ scenario: name })
)
.then(response => {
console.log("response:", response);
});
Metadata
Metadata
Assignees
Labels
No labels