Odometer Project implementation Phase 1
Tracking issue
Part of the Add Odometer mileage to NewDot project (design doc)
Task
Create test cases for the Odometer feature
- Create the manual test cases for odometer phase 1, listed in this doc
1) [UPDATED] Create a distance expense via the Global Create - Collect/Control Plan
- Click the + global create button
- Verify that the Track Distance option displays
- Click the Track Distance option
- Verify that a Map, Manual and Odometer tabs displays
- Verify that you land on the Map tab
- Click the Manual tab to create a manual distance expense
- Verify that if you enter a zero or a negative amount, you see the following error message: Please add a valid distance before continuing
- Verify that you can’t change the distance unit (km/mi)
- Verify that the mileage input is limited to 2 decimal places
- Click next
- Verify that the Distance and Rate rows have the right caret
- Verify that we display an empty state for the receipt
- Verify that you can attach a receipt
- Click the Distance option row
- Verify that you can update the distance amount
- Click the Rate option row
- Verify that you see a screen that displays all the workspace rates
- Verify that if you go back, the new rate will display, and the expense total amount will have updated.
- Click create expense
- Verify that the expense is created
- Verify that we display the attached receipt
- Repeat steps 1-7, but this time don’t attach a receipt
- Verify that the expense is created
- Verify that we display an empty state for the receipt (so that the user can manually attach a receipt if they need it).
- Click to add a receipt
- Verify that you can attach a receipt
2) [NEW] Create an odometer expense
- Click the + global create button
- Verify that the Track Distance option displays
- Click the Track Distance option
- Verify that a Map, Manual and Odometer tabs displays
- Click the Odometer tab to create an Odometer distance expense
- Verify that if you press the Next button, you see the following error message: Please enter both start & end readings to continue
- Enter readings for start and end
- Click next
- Verify that the Distance and Rate rows have the right caret
- Verify that we display an empty state for the receipt
- Click the Distance option row
- Verify that you can update the manual odometer readings
- Click the Rate option row
- Verify that you see a screen that displays all the workspace rates
- Verify that the screen copy reads: Select a reimbursement rate. These can only be updated by a workspace admin.
- Select a different rate
- Verify that if you go back, the new rate will display, and the expense total amount will have updated.
- Click create expense
- Verify that the expense is created
- Verify that we display the attached receipt
- Click to add a receipt
- Verify that you can attach an odometer image to the created expense
- Open the created expense
- Click the Distance field
- Verify that the odometer readings page displays with the original start and end readings
- Change the end reading to a new value
- Save the changes
- Verify that the distance updates to reflect the new readings
- Verify that the expense total amount recalculates based on the new distance and rate
3) [NEW] Create an odometer expense with images
- Click the + global create button
- Verify that the Track Distance option displays
- Click the Track Distance option
- Verify that a Map, Manual and Odometer tabs displays
- Click the Odometer tab to create an Odometer distance expense
- Enter start and end readings
- Click an image button to take an odometer reading
- Verify that tapping the start image button takes you to a page where you can take a photo or upload an image
- Take a photo
- Verify that you can replace and delete this image
- Click an image button to take an odometer reading
- Verify that tapping the end image button takes you to a page where you can take a photo or upload an image
- Take a photo
- Verify that you can replace and delete this images
- Click next
- Verify that you can see your images merged together
- Click the Distance option row
- Verify that you can update the manual odometer readings
- Verify you can replace the odometer images and this updates the merged image on the Confirm page
- Click create expense
- Verify that the expense is created
- Verify that we display the attached merged receipt
4) [NEW] Changing rate unit does not break odometer readings
- Precondition: workspace has distance rates enabled with a miles-based rate and a km-based rate
- Create an odometer expense (start: 100, end: 500) with the miles rate
- Verify the distance shows 400 mi
- Open the created expense
- Click Rate and select the km-based rate
- Verify the distance field shows the converted value (approximately 643.74 km)
- Click Distance
- Verify the start reading is still 100 and the end reading is still 500
- Verify the raw odometer readings have NOT been converted (they remain as original physical readings)
5) [NEW] Odometer readings persist for tracked expenses (selfDM)
- Navigate to your self-DM chat
- Click + > Track distance > Odometer
- Enter start reading: 200, end reading: 350
- Complete the expense creation
- Verify the expense is created with distance 150
- Log out and log back in
- Open the tracked expense in your self-DM
- Verify the expense still shows as an odometer expense (not reclassified as manual)
- Click Distance
- Verify start reading is 200 and end reading is 350
6) [NEW] Create odometer expense while offline
- Enable airplane mode / disconnect from network
- Click + > Track distance > Odometer
- Enter start reading: 50, end reading: 120
- Click Next
- Verify the confirm page shows distance of 70 with the correct rate applied
- Create the expense
- Verify the expense is created optimistically with correct distance and amount
- Reconnect to network
- Verify the expense syncs and the final data matches what was shown optimistically
Odometer Project implementation Phase 1
Tracking issue
Part of the Add Odometer mileage to NewDot project (design doc)
Task
Create test cases for the Odometer feature
1) [UPDATED] Create a distance expense via the Global Create - Collect/Control Plan
2) [NEW] Create an odometer expense
3) [NEW] Create an odometer expense with images
4) [NEW] Changing rate unit does not break odometer readings
5) [NEW] Odometer readings persist for tracked expenses (selfDM)
6) [NEW] Create odometer expense while offline