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

Commit

Permalink
Add new fields to edit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Elise Richards committed Nov 20, 2019
1 parent 763fe1c commit 62e0445
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,29 @@ class EditItemPresenterTest {

class FakeView : EditItemDetailView {

val togglePasswordVisibilityStub = PublishSubject.create<Unit>()
private val togglePasswordVisibilityStub = PublishSubject.create<Unit>()
override val togglePasswordVisibility: Observable<Unit>
get() = togglePasswordVisibilityStub

val passwordVisibleStub = false
private val passwordVisibleStub = false
override var isPasswordVisible: Boolean = passwordVisibleStub

val togglePwdClicksStub = PublishSubject.create<Unit>()
private val togglePwdClicksStub = PublishSubject.create<Unit>()
override val togglePasswordClicks: Observable<Unit>
get() = togglePwdClicksStub

val hostnameClicksStub = PublishSubject.create<String>()
private val hostnameClicksStub = PublishSubject.create<String>()
override val hostnameChanged: Observable<String>
get() = hostnameClicksStub

val usernameClicksStub = PublishSubject.create<String>()
override val usernameChanged: Observable<String>
get() = usernameClicksStub

private val usernameFieldClicksStub = PublishSubject.create<Unit>()
override val usernameFieldClicks: Observable<Unit>
get() = usernameFieldClicksStub

val pwdClicksStub = PublishSubject.create<String>()
override val passwordChanged: Observable<String>
get() = pwdClicksStub
Expand Down Expand Up @@ -98,6 +102,11 @@ class EditItemPresenterTest {
override fun setSaveEnabled(enabled: Boolean) {
_saveEnabled = enabled
}

override fun setTextSelectionOnPasswordToggle() {
// make sure the text selector is at the end of the line when password is toggled
// NOOP
}
}

@Mock
Expand Down

0 comments on commit 62e0445

Please sign in to comment.