mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
UITester: fix infinite loop in chat
This commit is contained in:
parent
72267d411c
commit
64a57f66e5
1 changed files with 6 additions and 2 deletions
|
|
@ -285,6 +285,7 @@
|
|||
[self uploadImageWithQuality:@"Minimum"];
|
||||
[self uploadImageWithQuality:@"Minimum"];
|
||||
UITableView *tv = [self findTableView:@"ChatRoom list"];
|
||||
int timeout = 3;
|
||||
// wait for ALL uploads to terminate...
|
||||
for (int i = 0; i < 90; i++) {
|
||||
[tester waitForTimeInterval:1.f];
|
||||
|
|
@ -296,17 +297,20 @@
|
|||
[tester scrollViewWithAccessibilityIdentifier:@"ChatRoom list" byFractionOfSizeHorizontal:0.f vertical:1.f];
|
||||
for (int i = 0; i < 2; i++) {
|
||||
// messages order is not known: if upload bitrate is huge, first image can be uploaded before last started
|
||||
while (![tester tryFindingTappableViewWithAccessibilityLabel:@"Download" error:nil]) {
|
||||
while (![tester tryFindingTappableViewWithAccessibilityLabel:@"Download" error:nil] && timeout) {
|
||||
[tester scrollViewWithAccessibilityIdentifier:@"ChatRoom list"
|
||||
byFractionOfSizeHorizontal:0.f
|
||||
vertical:-.1f];
|
||||
timeout--;
|
||||
}
|
||||
[tester waitForViewWithAccessibilityLabel:@"Download"];
|
||||
[tester tapViewWithAccessibilityLabel:@"Download"];
|
||||
[tester waitForTimeInterval:.2f]; // just wait a few secs to start download
|
||||
}
|
||||
while ([LinphoneManager instance].fileTransferDelegates.count > 0) {
|
||||
timeout = 30;
|
||||
while ([LinphoneManager instance].fileTransferDelegates.count > 0 && timeout) {
|
||||
[tester waitForTimeInterval:.5];
|
||||
timeout--;
|
||||
}
|
||||
[self goBackFromChat];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue