mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
Merge pull request #7289 from nextcloud/showSortingAgain
All files -> media --> all files: show sort header
This commit is contained in:
commit
f2e9d4f285
3 changed files with 36 additions and 1 deletions
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue