Browse Source

Fix git conflicts

Signed-off-by: alperozturk <alper_ozturk@proton.me>
alperozturk 1 year ago
parent
commit
299224bee0

BIN
app/screenshots/gplay/debug/com.nextcloud.client.SyncedFoldersActivityIT_open.png


+ 1 - 1
app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java

@@ -52,7 +52,7 @@ public class SyncedFoldersActivityIT extends AbstractIT {
     @ScreenshotTest
     public void open() {
         Activity sut = activityRule.launchActivity(null);
-
+        longSleep();
         screenshot(sut);
     }
 

+ 7 - 7
app/src/androidTest/java/com/owncloud/android/ui/activity/NotificationsActivityIT.kt

@@ -53,8 +53,6 @@ class NotificationsActivityIT : AbstractIT() {
     @ScreenshotTest
     @SuppressWarnings("MagicNumber")
     fun showNotifications() {
-        val sut: NotificationsActivity = activityRule.launchActivity(null)
-
         val date = GregorianCalendar()
         date.set(2005, 4, 17, 10, 35, 30) // random date
 
@@ -133,11 +131,13 @@ class NotificationsActivityIT : AbstractIT() {
             )
         )
 
-        sut.runOnUiThread { sut.populateList(notifications) }
-
-        shortSleep()
-
-        screenshot(sut)
+        activityRule.launchActivity(null).apply {
+            runOnUiThread {
+                populateList(notifications)
+            }
+            longSleep()
+            screenshot(this)
+        }
     }
 
     @Test

+ 9 - 12
app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailFragmentStaticServerIT.kt

@@ -94,12 +94,6 @@ class FileDetailFragmentStaticServerIT : AbstractIT() {
     @ScreenshotTest
     @Suppress("MagicNumber")
     fun showDetailsActivities() {
-        val activity = testActivityRule.launchActivity(null)
-        val sut = FileDetailFragment.newInstance(oCFile, user, 0)
-        activity.addFragment(sut)
-
-        waitForIdleSync()
-
         val date = GregorianCalendar()
         date.set(2005, 4, 17, 10, 35, 30) // random date
 
@@ -152,13 +146,16 @@ class FileDetailFragmentStaticServerIT : AbstractIT() {
             )
         )
 
-        activity.runOnUiThread {
-            sut.fileDetailActivitiesFragment.populateList(activities as List<Any>?, true)
+        val sut = FileDetailFragment.newInstance(oCFile, user, 0)
+        testActivityRule.launchActivity(null).apply {
+            addFragment(sut)
+            waitForIdleSync()
+            runOnUiThread {
+                sut.fileDetailActivitiesFragment.populateList(activities as List<Any>?, true)
+            }
+            longSleep()
+            screenshot(this)
         }
-
-        shortSleep()
-        shortSleep()
-        screenshot(activity)
     }
 
     // @Test