[Merge] lp:~abreu-alexandre/webbrowser-app/intent into lp:webbrowser-app

Alexandre Abreu alexandre.abreu at canonical.com
Thu Jan 29 16:53:36 UTC 2015


> > > 676     +    def get_intent_filtered_uri(self, uri):
> > > […]
> > > 681     +        webviewContainer.slots.handleIntentUri(uri)
> > >
> > > This is wrong, the test case shouldn’t call a slot on the QML object: this
> > is
> > > not testing a real-world use-case any longer. Instead, the webapp’s
> homepage
> > > should have an "intent://" link and the test should click that link and
> > ensure
> > > that as a result the URL of the webview changes to the expected
> transformed
> > > URL.
> >
> > I know that this is "wrong", but I did it this way after exploring how
> > 'intrumentable' the url-dispatcher was. And it is not at the required
> > level to test the whole flow ...
> >
> > The way that it is it test *some* of the logic and bits of code (closer
> > to something at the unit level),
> 
> Can’t the 'UriHandler' global object be mocked and made to emit its "opened"
> signal (without the need to tinker with the URL dispatcher)?
> 
> If not, at the very least this test case should have a comment to explain what
> it does and why it’s not a real integration test.

I am convinced by that approach at this level (of testing) ... we would still strain
a bit far from a proper function test, and imo wouldn't be that different from
the selective testing above really, ... I added a comment in the test
-- 
https://code.launchpad.net/~abreu-alexandre/webbrowser-app/intent/+merge/247421
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.



More information about the Ubuntu-reviews mailing list