particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Feature/sc 124023/disable enable refactor #708

Closed hugomontero closed 11 months ago

hugomontero commented 11 months ago

Description

This PR will change updateStatus command in order to use LogicFunction Class

How to Test

  1. Pull down the branch: git pull && git checkout feature/sc-124023/disable-enable-refactor
  2. Install dependencies: npm i
  3. Run tests: npm run test:ci && npm run test:e2e -- --grep "Logic Function Commands"
  4. Attempt to enable/disable a logic function:
    • Enable by name: `npm start -- lf enable --name ""
    • Enable by id: `npm start -- lf enable --id ""
    • Enable by using path: `npm start -- lf enable --name " /local/path/for/my/logic/function"
    • Enable by wrong name: `npm start -- lf enable --name ""
    • Disable by name: `npm start -- lf disable --name ""
    • Disable by id: `npm start -- lf disable --id ""
    • Disable by using path: `npm start -- lf disable --name " /local/path/for/my/logic/function"
    • Disable by wrong name: `npm start -- lf disable --name ""

Outcome

Related Issues / Discussions

Story details: https://app.shortcut.com/particle/story/124023

Completeness