mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
UITester: always select a different image
This commit is contained in:
parent
e71afc56f8
commit
83922f2d60
2 changed files with 8 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 21a137bc8068f9fb738f835c6e285d44fe2ce4dd
|
||||
Subproject commit c01c063616dbdab05bea25eb94c7643a52f2b7dc
|
||||
|
|
@ -68,9 +68,7 @@
|
|||
}
|
||||
|
||||
- (void)uploadImageWithQuality:(NSString *)quality {
|
||||
UITableView *tv = [self findTableView:@"ChatRoom list"];
|
||||
|
||||
long messagesCount = [tv numberOfRowsInSection:0];
|
||||
static int ind = 0;
|
||||
[tester tapViewWithAccessibilityLabel:@"Send picture"];
|
||||
[tester tapViewWithAccessibilityLabel:@"Photo library"];
|
||||
// if popup "Linphone would access your photo" pops up, click OK.
|
||||
|
|
@ -80,8 +78,11 @@
|
|||
}
|
||||
#endif
|
||||
|
||||
// select random photo to avoid having the same multiple times
|
||||
[tester choosePhotoInAlbum:@"Camera Roll" atRow:2 column:2 + (messagesCount % 2)];
|
||||
// select random photo to avoid having the same multiple times.
|
||||
// There are 9 photos by default, so lets use just 8 (2 rows, 4 columns).
|
||||
LOGI(@"Selecting photo at row %d, column %d", 1 + (ind / 4) % 2, 1 + ind % 4);
|
||||
[tester choosePhotoInAlbum:@"Camera Roll" atRow:1 + (ind / 4) % 2 column:1 + ind % 4];
|
||||
ind++;
|
||||
|
||||
// wait for the quality popup to show up
|
||||
UIAccessibilityElement *element = nil;
|
||||
|
|
@ -104,7 +105,7 @@
|
|||
// wait for the upload to terminate...
|
||||
for (int i = 0; i < 45; i++) {
|
||||
[tester waitForTimeInterval:1.f];
|
||||
if ([[[LinphoneManager instance] fileTransferDelegates] count] == 0)
|
||||
if (LinphoneManager.instance.fileTransferDelegates.count == 0)
|
||||
break;
|
||||
}
|
||||
[tester waitForViewWithAccessibilityLabel:@"Download"];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue