Merge lp:~canonical-platform-qa/webbrowser-app/webbrowser-app-private_browsing-refactor_tests into lp:~artmello/webbrowser-app/webbrowser-app-private_browsing
Status: | Merged |
---|---|
Approved by: | Arthur Mello |
Approved revision: | 1024 |
Merged at revision: | 1019 |
Proposed branch: | lp:~canonical-platform-qa/webbrowser-app/webbrowser-app-private_browsing-refactor_tests |
Merge into: | lp:~artmello/webbrowser-app/webbrowser-app-private_browsing |
Diff against target: |
237 lines (+93/-69) 3 files modified
tests/autopilot/webbrowser_app/emulators/browser.py (+53/-13) tests/autopilot/webbrowser_app/tests/__init__.py (+0/-35) tests/autopilot/webbrowser_app/tests/test_private.py (+40/-21) |
To merge this branch: | bzr merge lp:~canonical-platform-qa/webbrowser-app/webbrowser-app-private_browsing-refactor_tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Arthur Mello | Approve | ||
Review via email: mp+258945@code.launchpad.net |
Commit message
Refactor private mode autopilot tests.
Description of the change
Moved the helpers out of the testcase and into the Webbrowser object, so they can be reused in other tests that don't inherit from the browser test case. This also provides better encapsulation.
Added the logging decorator to the action helpers, so in case of failure it leaves a more useful trace of what the test was doing.
Added is_new_
Removed the assertions from the helpers. In most of the cases, the test should be the one checking that the actions were successful. This makes it clear what's the purpose of the test.
On test_url_
I added test_url_
I didn't modify the last test because it would mean changing some of the existing helpers and updating existing tests. If you find this refactor useful, I can do it in a following branch.
After the refactoring, what I noticed is that test_going_
https:/
Looks good to me. Thanks a lot for the feedback and the proposed fixes