Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Fixed UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ioana-farcas committed Nov 28, 2018
1 parent bcfe234 commit 0398a82
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/src/androidTest/java/mozilla/lockbox/Navigator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import android.support.test.espresso.NoActivityResumedException
import android.support.test.espresso.intent.Intents
import br.com.concretesolutions.kappuccino.custom.intent.IntentMatcherInteractions.sentIntent
import br.com.concretesolutions.kappuccino.custom.intent.IntentMatcherInteractions.stubIntent
import io.reactivex.plugins.RxJavaPlugins
import io.reactivex.schedulers.TestScheduler
import mozilla.lockbox.robots.accountSettingScreen
import mozilla.lockbox.robots.disconnectDisclaimer
import mozilla.lockbox.robots.filteredItemList
Expand All @@ -24,6 +26,7 @@ import mozilla.lockbox.robots.securityDisclaimer
import mozilla.lockbox.robots.settings
import mozilla.lockbox.robots.welcome
import org.junit.Assert
import java.util.concurrent.TimeUnit

class Navigator {
fun gotoFxALogin() {
Expand All @@ -40,8 +43,11 @@ class Navigator {
}

fun gotoItemList() {
val scheduler = TestScheduler()
RxJavaPlugins.setComputationSchedulerHandler { scheduler }
gotoFxALogin()
fxaLogin { tapPlaceholderLogin() }
scheduler.advanceTimeBy(1200, TimeUnit.MILLISECONDS)
checkAtItemList()
}

Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/drawable/rounded_corner_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/dark_grey"/>
<corners android:radius="6dp"/>
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_item_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
android:layout_height="48dp"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:background="@color/dark_grey"
android:background="@drawable/rounded_corner_bg"
android:gravity="center_vertical"
android:orientation="horizontal">

Expand Down

0 comments on commit 0398a82

Please sign in to comment.