[Merge] lp:~osomon/webbrowser-app/systemwide-search-engines into lp:webbrowser-app
Ugo Riboni
ugo.riboni at canonical.com
Wed May 6 21:59:05 UTC 2015
Review: Needs Fixing
Running the new AP tests gives this error:
Traceback (most recent call last):
File "/home/nerochiaro/projects/phone/webbrowser-app/tests/autopilot/webbrowser_app/tests/test_settings.py", line 45, in test_open_close_searchengine_page
self.assertThat(old_engine, NotEquals(""))
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 423, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: '' == ''
More info on my environment:
I have one file in ~/.local/share/webbrowser-app/searchengines called bing.xml and completely empty
I built the branch in-tree and I am running the tests from tests/autopilot
This seems to indicate that the browser is reading the files from ~/.local/share/webbrowser-app which should not happen during tests.
First verify why this makes the tests fail. I don't see why it should, so I suspect a bug somewhere.
Second, we are testing by doing things in the current user directory. This is not safe. We should add a test mode command line switch to the app which calls QStandardPaths::setTestModeEnabled(true), so that QT will return special test paths for all standard paths. Then run our tests in this mode.
Once that is done we should ideally set up more AP tests to verify the following features:
- test that the names and descriptions of the engines correspond to what is read from the files
- test overriding an engine by placing a file of the same name, and verifying that the search url, description and name are correctly overriden
- test overriding an engine by placing an empty file of the same name, then verifying that the engine is removed
- verify a few of the above by manipulating the files in the list while app is running and verifying that the settings page picks these up the next time it is opened.
--
https://code.launchpad.net/~osomon/webbrowser-app/systemwide-search-engines/+merge/257830
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.
More information about the Ubuntu-reviews
mailing list