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
PixelDroid
PixelDroid
Commits
f47f0bb2
Commit
f47f0bb2
authored
May 22, 2020
by
mjaillot
Browse files
Fixed tests
parent
64f13840
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/src/androidTest/java/com/h/pixeldroid/DrawerMenuTest.kt
View file @
f47f0bb2
...
...
@@ -5,7 +5,7 @@ import androidx.test.core.app.ActivityScenario
import
androidx.test.core.app.ApplicationProvider
import
androidx.test.espresso.Espresso.onView
import
androidx.test.espresso.action.ViewActions
import
androidx.test.espresso.action.ViewActions.
click
import
androidx.test.espresso.action.ViewActions.
*
import
androidx.test.espresso.assertion.ViewAssertions.matches
import
androidx.test.espresso.contrib.DrawerActions
import
androidx.test.espresso.contrib.DrawerMatchers
...
...
@@ -171,11 +171,11 @@ class DrawerMenuTest {
onView
(
withText
(
R
.
string
.
menu_account
)).
perform
(
click
())
Thread
.
sleep
(
100
)
// Open bookmarks tab
onView
(
withId
(
R
.
id
.
profilePage
)).
perform
(
CustomMatchers
.
slowS
wipeUp
(
true
))
Thread
.
sleep
(
100
0
)
onView
(
withId
(
R
.
id
.
editButton
)).
perform
(
s
wipeUp
())
Thread
.
sleep
(
100
)
onView
(
withId
(
R
.
id
.
profile_view_pager
))
.
perform
(
CustomMatchers
.
slowS
wipeLeft
(
true
))
Thread
.
sleep
(
100
0
)
.
perform
(
s
wipeLeft
())
Thread
.
sleep
(
100
)
// Open first post
onView
(
withId
(
R
.
id
.
profilePostsRecyclerView
))
...
...
@@ -183,7 +183,7 @@ class DrawerMenuTest {
RecyclerViewActions
.
actionOnItemAtPosition
<
ProfilePostsRecyclerViewAdapter
.
ViewHolder
>
(
0
,
CustomMatchers
.
clickChildViewWithId
(
R
.
id
.
postPreview
))
)
Thread
.
sleep
(
100
0
)
Thread
.
sleep
(
100
)
onView
(
withId
(
R
.
id
.
nlikes
)).
check
(
matches
(
withText
(
"5 Likes"
)))
}
...
...
app/src/androidTest/java/com/h/pixeldroid/MockedServerTest.kt
View file @
f47f0bb2
...
...
@@ -167,15 +167,16 @@ class MockedServerTest {
onView
(
withId
(
R
.
id
.
list
))
.
perform
(
actionOnItemAtPosition
<
PostViewHolder
>
(
0
,
clickChildViewWithId
(
R
.
id
.
username
)))
Thread
.
sleep
(
100
)
Thread
.
sleep
(
1000
)
onView
(
withId
(
R
.
id
.
followButton
)).
perform
(
ViewActions
.
swipeUp
()
)
// Open followers list
onView
(
withId
(
R
.
id
.
nbFollowersTextView
)).
perform
((
click
()))
Thread
.
sleep
(
100
0
)
Thread
.
sleep
(
100
)
// Open follower's profile
onView
(
withText
(
"ete2"
)).
perform
((
click
()))
Thread
.
sleep
(
100
0
)
Thread
.
sleep
(
100
)
onView
(
withId
(
R
.
id
.
accountNameTextView
)).
check
(
matches
(
withText
(
"Christian"
)))
}
...
...
app/src/main/res/layout/activity_profile.xml
View file @
f47f0bb2
...
...
@@ -11,7 +11,6 @@
android:layout_height=
"match_parent"
>
<LinearLayout
android:id=
"@+id/profilePage"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
...
...
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