Register
Submit a solution
The challenge is finished.

Challenge Overview

The Retail 360 iOS App is a tool used by Hercules employees in their retail stores.  The app allows for looking up customer details and will eventually contain lots of functionality for managing customer accounts, making changes to their accounts, and adding notes, sending emails, etc...
We have released version 1 of the app to some employees, and version 2 is nearing completion.  As we add more and more functionality, we need to ensure that the existing functionality isn't broken by any new changes.
This challenge will expand the UI unit tests for the app, which we will build on over the next couple of months to get proper coverage of the app.

Requirements:

This challenge will expand the unit tests that exist to cover the bill functionality for profiles

Coverage:

Proper coverage is required, of positive and negative test cases.  The reviewers should ensure that the coverage report can be run and that the coverage % is appropriate for the functionality tested.

Required tests:

Note:  All tests require a login and lookup.  Login and account lookup is already covered by other tests, so we can just make sure that the scripted test logs in and can get to the "Profile" tab with a loaded customer

* When a profile is loaded we show the "View Bill (PDF)" and "Compare Bills" buttons
* Clicking "View Bill (PDF)" will load the most recent bill for the user
* While the bill is loading, we need to ensure we show "Requesting bill" and then the loading bar
* The PDF fills the screen
* The PDF can be scrolled
* Clicking "Back" on "View Bill" goes back to the user profile
* Clicking "Compare Bills" goes to the compare bills screen
* Clicking "Back" on the "Compare Bills" screen goes back to the user profile
* The "Compare Bills" screen loads with the most recent bill and the previous bill immediately before it, compared
* Differences where the value is less vs. previous month are shown in green
* Differences where the value is more vs. previous month are shown in red
* The header row shows the totals for each month and the difference
* If there is no difference, that is displayed appropriately in the header
* Individual rows can be expanded to show more details
* Payments won't show a price difference for that particular row
* Similar rows from each month's bill need to align properly
* Clicking "Expand All" will expand all the rows
* When all rows are expanded, "Expand All" will change to "Collapse All" 
* Clicking "Collapse All" will collapse all rows
* Individual rows can be collapsed, if they are expanded
* The user can select different months to compare
* The month on the right will always be *after* the month on the left
* The same month can't be compared to itself


Helpful links:

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html
https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/07-code_coverage.html
* http://cleanswifter.com/measuring-swift-code-coverage/
https://developer.apple.com/videos/play/wwdc2015/410/
http://mgrebenets.github.io/mobile%20ci/2015/09/21/code-coverage-for-ios-xcode-7
 
Submission format

Your submission should be provided as a Git patch file against the commit hash mentioned in the forum.  MAKE SURE TO TEST YOUR PATCH FILE!

No video is required for this challenge.

A separate UNIT_TESTS_README.md exists in Git.  It should be updated for this challenge.


Final Submission Guidelines

Please see above

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30055943