Use view instead activity for ss tests

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-03-11 12:22:20 +01:00 committed by Alper Öztürk
parent e47437255f
commit 108d5223e5
4 changed files with 7 additions and 6 deletions

View file

@ -27,6 +27,7 @@ import android.content.Intent;
import com.nextcloud.client.preferences.SubFolderRule;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.databinding.SyncedFoldersLayoutBinding;
import com.owncloud.android.datamodel.MediaFolderType;
import com.owncloud.android.datamodel.SyncedFolderDisplayItem;
import com.owncloud.android.ui.activity.SyncedFoldersActivity;
@ -51,9 +52,9 @@ public class SyncedFoldersActivityIT extends AbstractIT {
@Test
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
longSleep();
screenshot(sut);
SyncedFoldersLayoutBinding sut = activityRule.launchActivity(null).binding;
shortSleep();
screenshot(sut.list);
}
@Test

View file

@ -173,7 +173,7 @@ class FileDetailFragmentStaticServerIT : AbstractIT() {
shortSleep()
shortSleep()
screenshot(activity)
screenshot(sut.fileDetailActivitiesFragment.binding.list)
}
@Test

View file

@ -165,7 +165,7 @@ class SyncedFoldersActivity :
@Inject
lateinit var syncedFolderProvider: SyncedFolderProvider
private lateinit var binding: SyncedFoldersLayoutBinding
lateinit var binding: SyncedFoldersLayoutBinding
private lateinit var adapter: SyncedFolderAdapter
private var syncedFolderPreferencesDialogFragment: SyncedFolderPreferencesDialogFragment? = null

View file

@ -106,7 +106,7 @@ public class FileDetailActivitiesFragment extends Fragment implements
private FileOperationsHelper operationsHelper;
private VersionListInterface.CommentCallback callback;
private FileDetailsActivitiesFragmentBinding binding;
FileDetailsActivitiesFragmentBinding binding;
@Inject UserAccountManager accountManager;
@Inject ClientFactory clientFactory;