Code review comment for lp:~elopio/ubuntu-clock-app/refactor_timer_tests

Revision history for this message
Leo Arias (elopio) wrote :

I fixed pep8 and pyflakes, because I'm a freak and can't live without that.
Then, I encapsulated the actions of the timer page in the TimerPage class, making public only the methods that represent action users. All internal things, like _get_X_element, or _click_something are private details of the emulators.

With this we make sure that the tests are high level user stories. They are short, and use the user language.

Lets say that in the future, designers decide that it's best if we add a button to add timers instead of doing that from the toolbar. In that case, we don't have to modify the test case, we only have to modify the _click_add_timer_button method.

On the prerequisite branch, nik added a check that the name of the timer was properly written. I moved it to
260 + if name_label.text != name:
but, the right thing to do is to have the textfield emulator making the check for us. I reported that as bug https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1275078

« Back to merge proposal