From 5807458a1d5d58bb84f0b060bc069b4b50d2215b Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Tue, 2 Aug 2016 13:05:01 +0300 Subject: [PATCH] CB-11656 (Android) Appium tests: Fixed side menu opening on certain resolutions --- appium-tests/android/android.spec.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/appium-tests/android/android.spec.js b/appium-tests/android/android.spec.js index 6c91609..eb65153 100644 --- a/appium-tests/android/android.spec.js +++ b/appium-tests/android/android.spec.js @@ -118,12 +118,12 @@ describe('Camera tests Android.', function () { tapTile .tap({ x: Math.round(screenWidth / 4), - y: Math.round(screenHeight / 5) + y: Math.round(screenHeight / 4) }); swipeRight .press({x: 10, y: 100}) .wait(300) - .moveTo({x: Math.round(screenWidth / 2), y: 0}) + .moveTo({x: Math.round(screenWidth - (screenWidth / 8)), y: 0}) .release() .wait(1000); if (options.allowEdit) { @@ -306,8 +306,8 @@ describe('Camera tests Android.', function () { .context(webviewContext) .execute(function () { return { - 'width': window.innerWidth, - 'height': window.innerHeight + 'width': screen.availWidth, + 'height': screen.availHeight }; }, []) .then(function (size) { @@ -330,8 +330,10 @@ describe('Camera tests Android.', function () { }) .then(function () { cameraAvailable = true; + }, function () { + return recreateSession(); }) - .finally(done); + .done(done); }, 5 * MINUTE); describe('Specs.', function () {