Hey James I've been trying to write tests for the third party search engines and am having issues getting many of them to run. When I try to run the UI tests I get the error
..../UITests/AuthenticationManagerTests.swift: test failure: -[AuthenticationManagerTests testChangedPasswordMustBeNew()] failed: failed: caught "NSInternalInconsistencyException", "Constant is not finite! That's illegal. constant:nan") I get this with any test that tries to open the new menu using tester().tapViewWithAccessibilityLabel("Menu") I dont have the latest code from master (about a week old). But I've rebuilt the project but still see the issue. Any ideas? Here is a gist of the entire crash https://gist.github.com/farhanpatel/b8b943f2263c45a59704fd54d77b1dfb I figured you've been digging into tests so you might have the answer :) Thanks! On Wed, May 4, 2016 at 1:47 PM, James Hugman <jhug...@mozilla.com> wrote: > Michael, > > Thanks, that's a really good tip. > > It works like a charm in the TestAppDelegate > <https://github.com/mozilla/firefox-ios/blob/master/Client/Application/TestAppDelegate.swift#L8>. > (the AppDelegate is the functional equivalent of `android.app.Application` > object). We get to choose which one to use at runtime. > > However, the I'm getting many more tests failing. (was: ~25 failing, now > ~80 failing). > > I think there are a whole bunch of tests that are relying on dumb timing. > BUT: I'm totally wanting to remove these animations, mainly for speed > reasons (the quicker the tests the more likely they'll be run on a dev > machine etc). > > So many thanks, awesome contribution! > > – James > > On Mon, May 2, 2016 at 6:01 PM, Michael Comella < > michael.l.come...@gmail.com> wrote: > >> Hey. >> >> I'm missing context but... >> >> On Sun, May 1, 2016 at 5:32 PM, James Hugman <jhug...@mozilla.com> wrote: >> >>> I thought this might be a set of fixes which roughly translate to >>> "sprinkle in a few `tester().waitForAnimationsToFinish()` statements", but >>> it turns out to not be as simple as that. >>> >> >> It doesn't sound like this is related to the cause of your problem, but >> for what it's worth, on Android Google recommends disabling animations >> during UI tests. I did a quick Google and it seems it's possible to do this >> on iOS: http://stackoverflow.com/a/32773490 >> - Mike >> > > > _______________________________________________ > mobile-firefox-dev mailing list > mobile-firefox-dev@mozilla.org > https://mail.mozilla.org/listinfo/mobile-firefox-dev > >
_______________________________________________ mobile-firefox-dev mailing list mobile-firefox-dev@mozilla.org https://mail.mozilla.org/listinfo/mobile-firefox-dev