Skip to content

Instantly share code, notes, and snippets.

@vojtech-cerveny
Last active November 20, 2020 15:16
Show Gist options
  • Save vojtech-cerveny/adc2c90e348fda1f1c0698a41d55a343 to your computer and use it in GitHub Desktop.
Save vojtech-cerveny/adc2c90e348fda1f1c0698a41d55a343 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
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