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

Implement AddOdometerReading AppIntent #5

Closed
wants to merge 1 commit into from

Conversation

OmarHegazy93
Copy link
Owner

What it Does

What is implemented?

  1. Vehicle now conforms to AppEntity protocol, hence, it should have an explicit id, which represents documentId under the hood
  2. VehicleQuery is simply fetching vehicles from the server
  3. DistanceUnit enum is used to make it more readable for selecting Distance unit
  4. In AddOdometerReadingIntent, validation is applied to Distance, and if the vehicles are empty, then the user will not be able to finish the shortcut

How I Tested

Happy Scenario

  1. Install the app
  2. Make sure at least one vehicle is added in the app by going to Settings tab > Add Vehicle
  3. Switch to Shortcuts app
  4. Tab on the + on the top right corner
  5. Tab on ⨁ Add Action
  6. Select Apps tab
  7. Tab on Basic Car
  8. Tab on Add Odometer Reading
  9. Add data for all fields and tab the play button on the bottom right corner
  10. See the result

Unhappy Scenario

Senario1

  1. Install the app
  2. Make sure at least one vehicle is added in the app by going to Settings tab > Add Vehicle
  3. Switch to Shortcuts app
  4. Tab on the + on the top right corner
  5. Tab on ⨁ Add Action
  6. Select Apps tab
  7. Tab on Basic Car
  8. Tab on Add Odometer Reading
  9. Try to set distance value to zero or negative value
  10. See the result (user won't be able to proceed if the distance value is less than 1)

Senario2

  1. Install the app
  2. Make sure no vehicles are added
  3. Switch to Shortcuts app
  4. Tab on the + on the top right corner
  5. Tab on ⨁ Add Action
  6. Select Apps tab
  7. Tab on Basic Car
  8. Tab on Add Odometer Reading
  9. Try to set distance value to zero or negative value
  10. See the result (user won't be able to proceed because there are no vehicles)

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.

FEATURE - Make an App Intent for Adding an Odometer Reading with Shortcuts
1 participant