mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 23:59:54 +01:00
Take a screenshot of the Navigation Drawer with lock action
This commit is contained in:
@@ -55,21 +55,8 @@ public class SettingsActivityScreenshotTest extends ScreenshotTest {
|
|||||||
.check(matches(isDisplayed()))
|
.check(matches(isDisplayed()))
|
||||||
.perform(click());
|
.perform(click());
|
||||||
|
|
||||||
// start main activity
|
// open nav drawer and remove expiry warning
|
||||||
Intent i =
|
openNavDrawer(true);
|
||||||
new Intent(testRule.getActivity(), NavDrawerActivity.class);
|
|
||||||
testRule.getActivity().startActivity(i);
|
|
||||||
|
|
||||||
// close expiry warning
|
|
||||||
onView(withId(R.id.expiryWarningClose))
|
|
||||||
.check(matches(isDisplayed()));
|
|
||||||
onView(withId(R.id.expiryWarningClose))
|
|
||||||
.perform(click());
|
|
||||||
|
|
||||||
// open navigation drawer
|
|
||||||
onView(withId(R.id.drawer_layout))
|
|
||||||
.check(matches(isClosed(Gravity.START)))
|
|
||||||
.perform(DrawerActions.open());
|
|
||||||
|
|
||||||
screenshot("manual_dark_theme_nav_drawer");
|
screenshot("manual_dark_theme_nav_drawer");
|
||||||
}
|
}
|
||||||
@@ -94,6 +81,31 @@ public class SettingsActivityScreenshotTest extends ScreenshotTest {
|
|||||||
.check(matches(isEnabled()));
|
.check(matches(isEnabled()));
|
||||||
|
|
||||||
screenshot("manual_app_lock");
|
screenshot("manual_app_lock");
|
||||||
|
|
||||||
|
// no more expiry warning to remove, because sharedprefs cached?
|
||||||
|
openNavDrawer(false);
|
||||||
|
|
||||||
|
screenshot("manual_app_lock_nav_drawer");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openNavDrawer(boolean expiry) {
|
||||||
|
// start main activity
|
||||||
|
Intent i =
|
||||||
|
new Intent(testRule.getActivity(), NavDrawerActivity.class);
|
||||||
|
testRule.getActivity().startActivity(i);
|
||||||
|
|
||||||
|
// close expiry warning
|
||||||
|
if (expiry) {
|
||||||
|
onView(withId(R.id.expiryWarningClose))
|
||||||
|
.check(matches(isDisplayed()));
|
||||||
|
onView(withId(R.id.expiryWarningClose))
|
||||||
|
.perform(click());
|
||||||
|
}
|
||||||
|
|
||||||
|
// open navigation drawer
|
||||||
|
onView(withId(R.id.drawer_layout))
|
||||||
|
.check(matches(isClosed(Gravity.START)))
|
||||||
|
.perform(DrawerActions.open());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user