Merge pull request #7289 from nextcloud/showSortingAgain

All files -> media --> all files: show sort header
This commit is contained in:
Tobias Kaminsky 2021-03-18 07:21:33 +01:00 committed by GitHub
commit f2e9d4f285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View file

@ -33,6 +33,7 @@ import org.junit.Rule;
import org.junit.Test;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.espresso.contrib.NavigationViewActions;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import androidx.test.rule.GrantPermissionRule;
@ -58,6 +59,40 @@ public class FileDisplayActivityScreenshotIT extends AbstractIT {
sut.getListOfFilesFragment().setLoading(false);
waitForIdleSync();
shortSleep();
screenshot(sut);
}
@Test
@ScreenshotTest
public void showMediaThenAllFiles() {
FileDisplayActivity sut = activityRule.launchActivity(null);
sut.getListOfFilesFragment().setFabEnabled(false);
sut.getListOfFilesFragment().setEmptyListLoadingMessage();
sut.getListOfFilesFragment().setLoading(false);
// open drawer
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
// click "all files"
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_gallery));
// wait
shortSleep();
// click "all files"
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_all_files));
// then compare screenshot
shortSleep();
sut.getListOfFilesFragment().setFabEnabled(false);
sut.getListOfFilesFragment().setEmptyListLoadingMessage();
sut.getListOfFilesFragment().setLoading(false);
shortSleep();
screenshot(sut);
}

View file

@ -208,7 +208,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
ADD_GRID_AND_SORT_WITH_SEARCH
}
protected MenuItemAddRemove menuItemAddRemoveValue = MenuItemAddRemove.DO_NOTHING;
protected MenuItemAddRemove menuItemAddRemoveValue = MenuItemAddRemove.ADD_GRID_AND_SORT_WITH_SEARCH;
private List<MenuItem> mOriginalMenuItems = new ArrayList<>();