Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android-setup): Add detect-adb step to the state machine #2833

Merged
merged 4 commits into from
Jun 10, 2020
Merged

feat(android-setup): Add detect-adb step to the state machine #2833

merged 4 commits into from
Jun 10, 2020

Conversation

RobGallo
Copy link
Contributor

@RobGallo RobGallo commented Jun 9, 2020

Description of changes

  • Add configuration for the detect-adb state machine step
  • Remove 'close' from AndroidSetupActions because an action to close the app exists elsewhere
  • Rework createAndroidSetupSteps into createStateMachineSteps so the logic could be tested independent of the types
    • Remove unit tests for allAndroidSetupSteps because it is essentially a data table
    • Add unit tests for createStateMachineSteps to ensure the steps in allAndroidSetupSteps will be created as expected
  • Add detectAdb function to AndroidSetupDeps
    • if adb path is detected, the return value will be true; otherwise, false
  • Rename android-setup-steps-factory.ts to android-setup-steps-configs.ts
  • Modify StateMachineStep.onEnter to be asynchronous
    • onEnter is designed to run background tasks such as detecting connected devices. Allowing such tasks to run asynchronously allows us to present UI such as wait spinners

Pull request checklist

  • Addresses an existing issue: #0000
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

- Add configuration for the detect-adb state machine step
- Remove 'close' from AndroidSetupActions because an action to close the app exists elsewhere
- Rework createAndroidSetupSteps into createStateMachineSteps so the logic could be tested independent of the types
	- Remove unit tests for allAndroidSetupSteps because it is essentially a data table
	- Add unit tests for createStateMachineSteps to ensure the steps in allAndroidSetupSteps will be created as expected
- Add detectAdb function to AndroidSetupDeps
	- if adb path is detected, the return value will be true; otherwise, false
- Rename android-setup-steps-factory.ts to android-setup-steps-configs.ts
- Modify StateMachineStep.onEnter to be asynchronous
	- onEnter is designed to run background tasks such as detecting connected devices. Allowing such tasks to run asynchronously allows us to present UI such as wait spinners
@RobGallo RobGallo requested a review from a team as a code owner June 9, 2020 23:25
@RobGallo RobGallo closed this Jun 10, 2020
@RobGallo RobGallo reopened this Jun 10, 2020
@JGibson2019
Copy link
Contributor

Should be good to go once the state machine tests are fixed!

@RobGallo RobGallo closed this Jun 10, 2020
@RobGallo RobGallo reopened this Jun 10, 2020
@RobGallo RobGallo closed this Jun 10, 2020
@RobGallo RobGallo reopened this Jun 10, 2020
@RobGallo RobGallo closed this Jun 10, 2020
@RobGallo RobGallo reopened this Jun 10, 2020
@RobGallo RobGallo closed this Jun 10, 2020
@RobGallo RobGallo reopened this Jun 10, 2020
@RobGallo RobGallo closed this Jun 10, 2020
@RobGallo RobGallo reopened this Jun 10, 2020
@RobGallo RobGallo merged commit d4ce903 into microsoft:master Jun 10, 2020
@RobGallo RobGallo deleted the adb branch June 10, 2020 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants