Skip to content

Instantly share code, notes, and snippets.

@vojtech-cerveny
Created November 20, 2020 14:53
Show Gist options
  • Save vojtech-cerveny/97b6cfcf1da4491f0006313da6562d81 to your computer and use it in GitHub Desktop.
Save vojtech-cerveny/97b6cfcf1da4491f0006313da6562d81 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: "wizard",
initial: "start",
states: {
start: {
on: {
BOM_UPLOAD: "step2",
},
meta: {
test: async () => {
await (await $('[data-qa-id="bom-upload"]')).waitForDisplayed()
},
},
},
start2: {
type: "final",
meta: {
test: async () => {
await (await $('[data-qa-id="bom-upload"]')).waitForDisplayed()
},
},
},
step2: {
on: {
CLICK_BACK: "start2",
// REQUEST_QUOTE: "step3",
},
meta: {
test: async () => {
await (await browser.$('[data-qa-id="back-button"]')).waitForDisplayed()
await (await $('[data-qa-id="cm-button"]')).waitForDisplayed()
},
},
},
// step3: {
// type: "final",
// meta: {
// test: async (page) => {
// await page.waitFor('[data-qa-id="estimated-price"]');
// },
// },
// },
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment