mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
TestsUI: fix push notification test
This commit is contained in:
parent
bb2b0d2035
commit
ccffb7d5a9
4 changed files with 21 additions and 12 deletions
|
|
@ -34,16 +34,6 @@
|
|||
|
||||
#pragma mark - tools
|
||||
|
||||
- (void)removeAllRooms {
|
||||
if (![tester tryFindingTappableViewWithAccessibilityLabel:@"Edit" error:nil])
|
||||
return;
|
||||
|
||||
[tester tapViewWithAccessibilityLabel:@"Edit" traits:UIAccessibilityTraitButton];
|
||||
[tester tapViewWithAccessibilityLabel:@"Select all" traits:UIAccessibilityTraitButton];
|
||||
[tester tapViewWithAccessibilityLabel:@"Delete all" traits:UIAccessibilityTraitButton];
|
||||
[tester tapViewWithAccessibilityLabel:@"DELETE" traits:UIAccessibilityTraitButton];
|
||||
}
|
||||
|
||||
- (void)dismissKeyboard {
|
||||
[tester tapScreenAtPoint:CGPointMake(0, 0)]; // dismiss keyboard, if any
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
- (void)waitForRegistration;
|
||||
|
||||
- (void)removeAllRooms;
|
||||
|
||||
@end
|
||||
|
||||
#define ASSERT_EQ(actual, expected) \
|
||||
|
|
|
|||
|
|
@ -180,4 +180,14 @@
|
|||
traits:UIAccessibilityTraitButton];
|
||||
}
|
||||
|
||||
- (void)removeAllRooms {
|
||||
if (![tester tryFindingTappableViewWithAccessibilityLabel:@"Edit" error:nil])
|
||||
return;
|
||||
|
||||
[tester tapViewWithAccessibilityLabel:@"Edit" traits:UIAccessibilityTraitButton];
|
||||
[tester tapViewWithAccessibilityLabel:@"Select all" traits:UIAccessibilityTraitButton];
|
||||
[tester tapViewWithAccessibilityLabel:@"Delete all" traits:UIAccessibilityTraitButton];
|
||||
[tester tapViewWithAccessibilityLabel:@"DELETE" traits:UIAccessibilityTraitButton];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -17,13 +17,20 @@
|
|||
[self switchToValidAccountIfNeeded];
|
||||
}
|
||||
|
||||
- (void)testCallNotificationInBackground {
|
||||
- (void)testChatRemoteNotification {
|
||||
[tester tapViewWithAccessibilityLabel:@"Chat"];
|
||||
[self removeAllRooms];
|
||||
|
||||
const LinphoneAddress *addr =
|
||||
linphone_proxy_config_get_identity_address(linphone_core_get_default_proxy_config(LC));
|
||||
LinphoneChatMessage *msg = linphone_chat_room_create_message(linphone_core_get_chat_room(LC, addr), "hello my own");
|
||||
linphone_chat_room_send_chat_message(linphone_core_get_chat_room(LC, addr), msg);
|
||||
linphone_core_set_network_reachable(LC, NO);
|
||||
[tester waitForViewWithAccessibilityLabel:@"hello my own"];
|
||||
|
||||
[tester tapViewWithAccessibilityLabel:@"Chat"];
|
||||
[tester waitForViewWithAccessibilityLabel:@"Contact name, Message"
|
||||
value:[NSString stringWithFormat:@"%@, hello my own (1)", self.me]
|
||||
traits:UIAccessibilityTraitStaticText];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue