Skip to content
GitLab
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
1f250a73
Commit
1f250a73
authored
Feb 11, 2020
by
Jeff Boek
Browse files
For #5905 - Fixes UI tests
parent
8288739a
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/androidTest/java/org/mozilla/fenix/ui/SettingsBasicsTest.kt
View file @
1f250a73
...
...
@@ -79,7 +79,7 @@ class SettingsBasicsTest {
verifySearchBrowsingHistory
()
verifySearchBookmarks
()
}.
goBack
{
}.
open
Them
eSubMenu
{
}.
open
Customiz
eSubMenu
{
verifyThemes
()
}.
goBack
{
}.
openAccessibilitySubMenu
{
...
...
@@ -165,7 +165,7 @@ class SettingsBasicsTest {
homeScreen
{
}.
openThreeDotMenu
{
}.
openSettings
{
}.
open
Them
eSubMenu
{
}.
open
Customiz
eSubMenu
{
verifyThemes
()
selectDarkMode
()
verifyDarkThemeApplied
(
getUiTheme
())
...
...
app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsRobot.kt
View file @
1f250a73
...
...
@@ -52,7 +52,7 @@ class SettingsRobot {
fun
verifyEnhancedTrackingProtectionValue
(
state
:
String
)
=
assertEnhancedTrackingProtectionValue
(
state
)
fun
verifyAddPrivateBrowsingShortcutButton
()
=
assert
Add
PrivateBrowsing
Shortcut
Button
()
fun
verifyAddPrivateBrowsingShortcutButton
()
=
assertPrivateBrowsingButton
()
fun
verifySitePermissionsButton
()
=
assertSitePermissionsButton
()
fun
verifyDeleteBrowsingDataButton
()
=
assertDeleteBrowsingDataButton
()
fun
verifyDeleteBrowsingDataOnQuitButton
()
=
assertDeleteBrowsingDataOnQuitButton
()
...
...
@@ -102,10 +102,10 @@ class SettingsRobot {
return
SettingsSubMenuSearchRobot
.
Transition
()
}
fun
open
Them
eSubMenu
(
interact
:
SettingsSubMenuThemeRobot
.()
->
Unit
):
SettingsSubMenuThemeRobot
.
Transition
{
fun
open
Customiz
eSubMenu
(
interact
:
SettingsSubMenuThemeRobot
.()
->
Unit
):
SettingsSubMenuThemeRobot
.
Transition
{
fun
them
eButton
()
=
onView
(
ViewMatchers
.
withText
(
"
Them
e"
))
them
eButton
().
click
()
fun
customiz
eButton
()
=
onView
(
ViewMatchers
.
withText
(
"
Customiz
e"
))
customiz
eButton
().
click
()
SettingsSubMenuThemeRobot
().
interact
()
return
SettingsSubMenuThemeRobot
.
Transition
()
...
...
@@ -211,10 +211,10 @@ private fun assertLoginsButton() {
.
check
(
matches
(
withEffectiveVisibility
(
Visibility
.
VISIBLE
)))
}
private
fun
assert
Add
PrivateBrowsing
Shortcut
Button
()
{
TestHelper
.
scrollToElementByText
(
"
Add p
rivate browsing
shortcut
"
)
mDevice
.
wait
(
Until
.
findObject
(
By
.
text
(
"
Add p
rivate browsing
shortcut
"
)),
waitingTime
)
onView
(
ViewMatchers
.
withText
(
"
Add p
rivate browsing
shortcut
"
))
private
fun
assertPrivateBrowsingButton
()
{
TestHelper
.
scrollToElementByText
(
"
P
rivate browsing"
)
mDevice
.
wait
(
Until
.
findObject
(
By
.
text
(
"
P
rivate browsing"
)),
waitingTime
)
onView
(
ViewMatchers
.
withText
(
"
P
rivate browsing"
))
.
check
(
matches
(
withEffectiveVisibility
(
Visibility
.
VISIBLE
)))
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment