Guest User

Untitled

a guest
Jul 19th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. - [x] create `@cliBefore(functionName)` decorator. the function itself will get the `@cliBeforeEach` result object
  2. - [ ] create `@cliAfter(functionName)` decorator. the function itself will get the `@cliAfterEach` result object
  3. - [ ] generate a mock cli library
  4.  
  5. ### generate a mock cli library
  6. This will generate an `<cli_name>-mock.js` library with the following methods:
  7.  
  8. - `<cli_name>-mock.inject(parentElement, onboardingFlowName)` - will inject a terminal object with the onboarding flow loaded. if no onboardingFlowName is given, runs the basic mock flow (supports help output and shows general output if defined)
  9. - `<cli_name>-mock.defineOnboarding(name, flow)` - will create an onboarding flow. the `flow` param is an array of objects. each object is a step with the following attributes:
  10.  
  11. ```javascript
  12. const firstStep = {
  13. description: 'welcome! to start, please run "myCli configure myEmail@gmail.com"',
  14. forcedRun: 'myCli configure myEmail@gmail.com'
  15. output: 'this is the example output!'
  16. };
  17. ```
  18. then, the onboarding will be less generic and guide the user to run a speicific flow.
  19. The only other functions the user can run in this mode besides the defined function, is the `--help` functions
Add Comment
Please, Sign In to add comment