Taking this fixture I would like to set the checkoutId
based on the result from the API call in the before
fixture hook so I can use it to set the page on my tests
let checkoutId;
fixture`Check out as guest user`
.page`localhost:3001/checkout/start/${checkoutId}`
.before(async () => {
await checkout.getCheckoutId(sampleData.cart)
.then(id => (checkoutId = id));
});
// and here the rest of my tests based on the page
I tried fixture hooks, sharing variables but I can't get it to work, checkoutId is undefined when requesting the page.
Is this scenario even possible?