From e0703b3746c984b2994b0620e804fba74f6f9ee9 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 8 Apr 2016 12:03:47 +0200 Subject: [PATCH] TestsUI: add some timeout tolerance --- TestsUI/NotificationTester.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TestsUI/NotificationTester.m b/TestsUI/NotificationTester.m index e9b8699bb..889c9cfee 100644 --- a/TestsUI/NotificationTester.m +++ b/TestsUI/NotificationTester.m @@ -28,6 +28,13 @@ linphone_core_set_network_reachable(LC, NO); [tester tapViewWithAccessibilityLabel:@"Chat"]; + + // it can take several seconds to receive the remote push notification... + int timeout = 5; + while (timeout > 0) { + [tester tryFindingViewWithAccessibilityLabel:@"Contact name, Message" error:nil]; + timeout--; + } [tester waitForViewWithAccessibilityLabel:@"Contact name, Message" value:[NSString stringWithFormat:@"%@, hello my own (1)", self.me] traits:UIAccessibilityTraitStaticText];