Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
fenix
Commits
fe17e2ac
Commit
fe17e2ac
authored
Feb 07, 2020
by
Kadeem
Committed by
Emily Kager
Feb 08, 2020
Browse files
Updated About Settings Tests to check if a view is completely displayed
parent
60a97e66
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsRobot.kt
View file @
fe17e2ac
...
...
@@ -17,6 +17,7 @@ import androidx.test.espresso.intent.Intents.intended
import
androidx.test.espresso.intent.matcher.IntentMatchers.toPackage
import
androidx.test.espresso.matcher.ViewMatchers
import
androidx.test.espresso.matcher.ViewMatchers.Visibility
import
androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed
import
androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility
import
androidx.test.platform.app.InstrumentationRegistry
import
androidx.test.uiautomator.By
...
...
@@ -250,19 +251,19 @@ private fun assertRemoteDebug() {
private
fun
assertAboutHeading
():
ViewInteraction
{
TestHelper
.
scrollToElementByText
(
"About"
)
return
onView
(
ViewMatchers
.
withText
(
"About"
))
.
check
(
matches
(
withEffectiveVisibility
(
Visibility
.
VISIBLE
)))
.
check
(
matches
(
isCompletelyDisplayed
(
)))
}
private
fun
assertRateOnGooglePlay
():
ViewInteraction
{
TestHelper
.
scrollToElementByText
(
"About Firefox Preview"
)
return
onView
(
ViewMatchers
.
withText
(
"Rate on Google Play"
))
.
check
(
matches
(
withEffectiveVisibility
(
Visibility
.
VISIBLE
)))
.
check
(
matches
(
isCompletelyDisplayed
(
)))
}
private
fun
assertAboutFirefoxPreview
():
ViewInteraction
{
TestHelper
.
scrollToElementByText
(
"About Firefox Preview"
)
return
onView
(
ViewMatchers
.
withText
(
"About Firefox Preview"
))
.
check
(
matches
(
withEffectiveVisibility
(
Visibility
.
VISIBLE
)))
.
check
(
matches
(
isCompletelyDisplayed
(
)))
}
fun
swipeToBottom
()
=
onView
(
ViewMatchers
.
withId
(
R
.
id
.
recycler_view
)).
perform
(
ViewActions
.
swipeUp
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment