Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Dehm
briar
Commits
8d592ad2
Verified
Commit
8d592ad2
authored
6 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
Take screenshot of Tor settings
parent
055c381c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-android/src/androidTest/java/org/briarproject/briar/android/settings/SettingsActivityScreenshotTest.java
+21
-2
21 additions, 2 deletions
...riar/android/settings/SettingsActivityScreenshotTest.java
with
21 additions
and
2 deletions
briar-android/src/androidTest/java/org/briarproject/briar/android/settings/SettingsActivityScreenshotTest.java
+
21
−
2
View file @
8d592ad2
...
@@ -18,7 +18,8 @@ import static android.support.test.espresso.Espresso.onView;
...
@@ -18,7 +18,8 @@ import static android.support.test.espresso.Espresso.onView;
import
static
android
.
support
.
test
.
espresso
.
action
.
ViewActions
.
click
;
import
static
android
.
support
.
test
.
espresso
.
action
.
ViewActions
.
click
;
import
static
android
.
support
.
test
.
espresso
.
assertion
.
ViewAssertions
.
matches
;
import
static
android
.
support
.
test
.
espresso
.
assertion
.
ViewAssertions
.
matches
;
import
static
android
.
support
.
test
.
espresso
.
contrib
.
DrawerMatchers
.
isClosed
;
import
static
android
.
support
.
test
.
espresso
.
contrib
.
DrawerMatchers
.
isClosed
;
import
static
android
.
support
.
test
.
espresso
.
contrib
.
RecyclerViewActions
.
scrollToPosition
;
import
static
android
.
support
.
test
.
espresso
.
contrib
.
RecyclerViewActions
.
scrollTo
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
hasDescendant
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
isDisplayed
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
isDisplayed
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
isEnabled
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
isEnabled
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
withChild
;
import
static
android
.
support
.
test
.
espresso
.
matcher
.
ViewMatchers
.
withChild
;
...
@@ -65,7 +66,9 @@ public class SettingsActivityScreenshotTest extends ScreenshotTest {
...
@@ -65,7 +66,9 @@ public class SettingsActivityScreenshotTest extends ScreenshotTest {
public
void
appLock
()
{
public
void
appLock
()
{
// scroll down
// scroll down
onView
(
withClassName
(
is
(
RecyclerView
.
class
.
getName
())))
onView
(
withClassName
(
is
(
RecyclerView
.
class
.
getName
())))
.
perform
(
scrollToPosition
(
13
));
.
perform
(
scrollTo
(
hasDescendant
(
// scroll down a bit more to have settings in the middle
withText
(
R
.
string
.
panic_setting
))));
// wait for settings to get loaded and enabled
// wait for settings to get loaded and enabled
onView
(
withText
(
R
.
string
.
tor_mobile_data_title
))
onView
(
withText
(
R
.
string
.
tor_mobile_data_title
))
...
@@ -88,6 +91,22 @@ public class SettingsActivityScreenshotTest extends ScreenshotTest {
...
@@ -88,6 +91,22 @@ public class SettingsActivityScreenshotTest extends ScreenshotTest {
screenshot
(
"manual_app_lock_nav_drawer"
);
screenshot
(
"manual_app_lock_nav_drawer"
);
}
}
@Test
public
void
torSettings
()
{
// scroll down
onView
(
withClassName
(
is
(
RecyclerView
.
class
.
getName
())))
.
perform
(
scrollTo
(
hasDescendant
(
// scroll down a bit more to have settings in the middle
withText
(
R
.
string
.
pref_lock_timeout_title
))));
// wait for settings to get loaded and enabled
onView
(
withText
(
R
.
string
.
tor_network_setting
))
.
check
(
matches
(
isDisplayed
()))
.
perform
(
waitUntilMatches
(
isEnabled
()));
screenshot
(
"manual_tor_settings"
);
}
private
void
openNavDrawer
(
boolean
expiry
)
{
private
void
openNavDrawer
(
boolean
expiry
)
{
// start main activity
// start main activity
Intent
i
=
Intent
i
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment