icy-airplane-66230
02/01/2022, 9:00 AMicy-airplane-66230
02/01/2022, 9:00 AMwonderful-match-15836
02/01/2022, 3:00 PMwonderful-match-15836
02/01/2022, 3:02 PMwindow.Cypress
and if it's true
add your store to the window
object as well, then in your test you can call your store's actions to set up the cart directly, in the way that gets it to the step you want to test.fancy-match-96032
02/01/2022, 3:24 PMvisit
with a new mount
function, and pass in your form component with props. the rest of the API (assertions, spying, etc) is exactly the same.
in this example you would still want e2e tests for the checkout workflow, but being able to test a "page" in isolation and asserting it functions properly given various permutations of state means you could (probably, depending on your app) reduce the number of e2e tests, which would also greatly speed up your test suitefancy-match-96032
02/01/2022, 3:50 PMicy-airplane-66230
02/02/2022, 9:35 AMfancy-match-96032
02/03/2022, 1:58 PM