From fdb91a2fd0e222dcf04026fff04c0be51a6718c8 Mon Sep 17 00:00:00 2001 From: farhan-arshad-dev Date: Mon, 15 Oct 2018 17:20:58 +0500 Subject: [PATCH] Update facebook screenshot lib to 0.8.0 - LEARNER-5799 - Comment Removed attributes from the screentshots gradle file. - Move the screenshots png's to the new directory named "API_21_NO_GP_XHDPI_768x1280_armeabi-v7a_" - Move extra png's(having issue to complete screenshoot test) to the new directory named "discovery_screenshots". - Move the DiscoveryLaunchScreenshotTests(having issue to perform screenshot test) to the root directory. --- Makefile | 4 ++-- OpenEdXMobile/build.gradle | 16 +++++++++------- ...stScreenshot_withCourseDiscoveryDisabled.png | Bin ...estScreenshot_withCourseDiscoveryEnabled.png | Bin ...ests_testScreenshot_recordLaunchActivity.png | Bin .../DiscoveryLaunchScreenshotTests.java | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) rename OpenEdXMobile/{screenshots => discovery_screenshots}/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryDisabled.png (100%) rename OpenEdXMobile/{screenshots => discovery_screenshots}/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryEnabled.png (100%) rename OpenEdXMobile/screenshots/{ => API_21_NO_GP_XHDPI_768x1280_armeabi-v7a_}/org.edx.mobile.test.screenshot.test.LaunchScreenshotTests_testScreenshot_recordLaunchActivity.png (100%) rename OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/{screenshot/test => }/DiscoveryLaunchScreenshotTests.java (93%) diff --git a/Makefile b/Makefile index d134f9b168..6891b97657 100644 --- a/Makefile +++ b/Makefile @@ -57,9 +57,9 @@ test: validate: quality test e2e : - @./gradlew verifyMode screenshotTests -PdisablePreDex + @./gradlew verifyProdDebuggableAndroidTestScreenshotTest -PdisablePreDex artifacts: @./gradlew copyLintBuildArtifacts @./gradlew copyUnitTestBuildArtifacts - @./gradlew recordMode pullScreenshots -PdisablePreDex + @./gradlew pullProdDebuggableAndroidTestScreenshots -PdisablePreDex diff --git a/OpenEdXMobile/build.gradle b/OpenEdXMobile/build.gradle index f030e6aa67..95a961e222 100644 --- a/OpenEdXMobile/build.gradle +++ b/OpenEdXMobile/build.gradle @@ -16,7 +16,7 @@ buildscript { //Included for NewRelic classpath "com.newrelic.agent.android:agent-gradle-plugin:5.4.1" - classpath 'com.facebook.testing.screenshot:plugin:0.6.0' + classpath 'com.facebook.testing.screenshot:plugin:0.8.0' classpath 'com.google.gms:google-services:4.0.1' } } @@ -281,10 +281,12 @@ android { // test configuration testApplicationId 'org.edx.mobile.test' - if (project.gradle.startParameter.taskNames.contains("screenshotTests")) { - Map map = new HashMap(); - map.put("package", "org.edx.mobile.test.screenshot"); - setTestInstrumentationRunnerArguments map + for(commands in project.gradle.startParameter.taskNames) { + if (commands .contains("ScreenshotTest") ) { + Map map = new HashMap(); + map.put("package", "org.edx.mobile.test.screenshot"); + setTestInstrumentationRunnerArguments map + } } testInstrumentationRunner "org.edx.mobile.test.EdXTestRunner" @@ -475,6 +477,6 @@ android.applicationVariants.all { variant -> } screenshots { - testApkTarget = 'packageProdDebuggableAndroidTest' - connectedAndroidTestTarget = 'connectedProdDebuggableAndroidTest' +// testApkTarget = 'packageProdDebuggableAndroidTest' +// connectedAndroidTestTarget = 'connectedProdDebuggableAndroidTest' } diff --git a/OpenEdXMobile/screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryDisabled.png b/OpenEdXMobile/discovery_screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryDisabled.png similarity index 100% rename from OpenEdXMobile/screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryDisabled.png rename to OpenEdXMobile/discovery_screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryDisabled.png diff --git a/OpenEdXMobile/screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryEnabled.png b/OpenEdXMobile/discovery_screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryEnabled.png similarity index 100% rename from OpenEdXMobile/screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryEnabled.png rename to OpenEdXMobile/discovery_screenshots/org.edx.mobile.test.screenshot.test.DiscoveryLaunchScreenshotTests_testScreenshot_withCourseDiscoveryEnabled.png diff --git a/OpenEdXMobile/screenshots/org.edx.mobile.test.screenshot.test.LaunchScreenshotTests_testScreenshot_recordLaunchActivity.png b/OpenEdXMobile/screenshots/API_21_NO_GP_XHDPI_768x1280_armeabi-v7a_/org.edx.mobile.test.screenshot.test.LaunchScreenshotTests_testScreenshot_recordLaunchActivity.png similarity index 100% rename from OpenEdXMobile/screenshots/org.edx.mobile.test.screenshot.test.LaunchScreenshotTests_testScreenshot_recordLaunchActivity.png rename to OpenEdXMobile/screenshots/API_21_NO_GP_XHDPI_768x1280_armeabi-v7a_/org.edx.mobile.test.screenshot.test.LaunchScreenshotTests_testScreenshot_recordLaunchActivity.png diff --git a/OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/screenshot/test/DiscoveryLaunchScreenshotTests.java b/OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/DiscoveryLaunchScreenshotTests.java similarity index 93% rename from OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/screenshot/test/DiscoveryLaunchScreenshotTests.java rename to OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/DiscoveryLaunchScreenshotTests.java index 88ab152b7b..115098ab3f 100644 --- a/OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/screenshot/test/DiscoveryLaunchScreenshotTests.java +++ b/OpenEdXMobile/src/androidTest/java/org/edx/mobile/test/DiscoveryLaunchScreenshotTests.java @@ -1,4 +1,4 @@ -package org.edx.mobile.test.screenshot.test; +package org.edx.mobile.test; import org.edx.mobile.view.DiscoveryLaunchActivity; import org.edx.mobile.view.DiscoveryLaunchPresenter;