openmrs/openmrs-distro-referenceapplication — pull request #6 by LeeBreisacher (2013-06-16 17:40:43+00:00)
Title: RA-79, some initial proposed improvements

I made an assortment of changes to the initial framework. Hopefully improvements. I'd love some feedback. Some of what I changed:
- I want to capture the notion of "Are we where we think we should be?" At the simplest, this is just, Are we on the expected page? (For now, just based on the

). So I introduced assertPage in TestBase (along with expectedTitle() in AbstractBasePage). I also introduced GenericPage which is a subclass of AbstractBasePage for use when you don't know what page you're on but you want to use all the convenient methods in AbstractBasePage.
- I made AbstractBasePage abstract.
- I sortof cleaned up and refactored some in AbstractBasePage to remove duplication.
- I added some comments. I also left some TODO markers with sortof questions about various details.
- I moved login() from AbstractBasePage to LoginPage.

Other notes:
- Perhaps there should be an Interface called "Page" that AbstractBasePage implements. Just seems like it might be a bit cleaner.
- I'm going to continue along these lines, trying to focus on (1) clean easy to use framework, (2) making it easy for tests to ensure that things are setup properly before the actual test begins (referring to the online discussions about starting with a clean set of data vs. robust tests that setup their own data).