Last active
November 20, 2020 15:16
-
-
Save vojtech-cerveny/adc2c90e348fda1f1c0698a41d55a343 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
const adcoMachine = Machine({ | |
id: 'wizard', | |
initial: 'start', | |
context: { | |
back: false, | |
}, | |
states: { | |
start: { | |
on: { | |
BOM_UPLOAD: 'uploaded_bom', | |
}, | |
meta: { | |
test: async () => { | |
await (await $('[data-qa-id="bom-upload"]')).waitForDisplayed(); | |
}, | |
}, | |
}, | |
uploaded_bom: { | |
on: { | |
CLICK_BACK: { | |
target: 'start', | |
actions: assign({ back: true }), | |
// REQUEST_QUOTE: "step3", | |
}, | |
}, | |
meta: { | |
test: async () => { | |
await (await browser.$('[data-qa-id="back-button"]')).waitForDisplayed(); | |
await (await $('[data-qa-id="cm-button"]')).waitForDisplayed(); | |
}, | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment