Created
November 20, 2020 14:53
-
-
Save vojtech-cerveny/97b6cfcf1da4491f0006313da6562d81 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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