From a1e48e2dcab8f82cd4d571895613df53c784a1bb Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 25 Mar 2016 10:48:38 +0100 Subject: [PATCH] TestsUI: fix cancel download test on real device --- TestsUI/ChatTester.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TestsUI/ChatTester.m b/TestsUI/ChatTester.m index 334a61b44..79f65da29 100644 --- a/TestsUI/ChatTester.m +++ b/TestsUI/ChatTester.m @@ -90,9 +90,9 @@ [tester tapViewWithAccessibilityLabel:element.accessibilityLabel]; } -- (void)downloadImage { +- (void)downloadImageWithQuality:(NSString *)quality { [self startChatWith:[self me]]; - [self uploadImageWithQuality:@"Minimum"]; + [self uploadImageWithQuality:quality]; // wait for the upload to terminate... for (int i = 0; i < 90; i++) { [tester waitForTimeInterval:1.f]; @@ -101,7 +101,7 @@ } [tester waitForViewWithAccessibilityLabel:@"Download"]; [tester tapViewWithAccessibilityLabel:@"Download"]; - [tester waitForTimeInterval:.5f]; // just wait a few secs to start download + [tester waitForTimeInterval:.1f]; // just wait a few msecs to start download ASSERT_EQ(LinphoneManager.instance.fileTransferDelegates.count, 1); } @@ -255,7 +255,7 @@ } - (void)testTransferCancelDownloadImage { - [self downloadImage]; + [self downloadImageWithQuality:@"Maximum"]; [tester tapViewWithAccessibilityLabel:@"Cancel"]; ASSERT_EQ([[[LinphoneManager instance] fileTransferDelegates] count], 0); } @@ -275,7 +275,7 @@ } - (void)testTransferDownloadImage { - [self downloadImage]; + [self downloadImageWithQuality:@"Minimum"]; [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Cancel"]; ASSERT_EQ([[[LinphoneManager instance] fileTransferDelegates] count], 0); }