Hey Farhan,

I was seeing this crash on a KIF test I was writing last week but has since
been resolved on master from Emily's changes here [1]. If you haven't
written the test yet it would be best to start up a new UITesting target
that uses the new UITest framework instead of KIF. Rebasing master into
your branch should resolve the crash.

[1]
https://github.com/mozilla/firefox-ios/commit/ce56ae7cef41a34e8de118d4ad74b86e982b7553

On Thu, May 12, 2016 at 3:46 AM, Emily Toop <[email protected]> wrote:

> Farhan,
>
> It would be really great if new UITests were written using the new
> UITesting framework rather than expanding on the existing KIF tests. Any
> chance you could create a new target for UITesting and write these new
> tests in there? Once the target is there it will be easier to start adding
> to them!
>
> Cheers
>
> Emily
>
> On 12 May 2016 at 06:28, Farhan Patel <[email protected]> wrote:
>
>> 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 <[email protected]> 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 <
>>> [email protected]> wrote:
>>>
>>>> Hey.
>>>>
>>>> I'm missing context but...
>>>>
>>>> On Sun, May 1, 2016 at 5:32 PM, James Hugman <[email protected]>
>>>> 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
>>> [email protected]
>>> https://mail.mozilla.org/listinfo/mobile-firefox-dev
>>>
>>>
>>
>> _______________________________________________
>> mobile-firefox-dev mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/mobile-firefox-dev
>>
>>
>
> _______________________________________________
> mobile-firefox-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/mobile-firefox-dev
>
>
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to