File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
androidTest/kotlin/com/hana053/micropost/pages/login
kotlin/com/hana053/micropost/pages/login Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ class LoginActivityTest : InjectableTest by InjectableTestImpl() {
35
35
@Rule @JvmField
36
36
val activityRule = ActivityTestRule (LoginActivity ::class .java, false , false )
37
37
38
- val loginBtn: Matcher <View > = withId(R .id.loginBtn )
39
- val emailEditText: Matcher <View > = withId(R .id.emailEditText )
40
- val passwordEditText: Matcher <View > = withId(R .id.passwordEditText )
38
+ val loginBtn: Matcher <View > = withId(R .id.btn_login )
39
+ val emailEditText: Matcher <View > = withId(R .id.et_email )
40
+ val passwordEditText: Matcher <View > = withId(R .id.et_password )
41
41
42
42
@Test
43
43
fun shouldBeOpened () {
Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ import rx.Observable
11
11
class LoginView (override val content : ViewGroup ) : ViewWrapper {
12
12
13
13
// Events
14
- val emailChanges: Observable <String > = content.emailEditText
14
+ val emailChanges: Observable <String > = content.et_email
15
15
.textChanges()
16
16
.map { it.toString() }
17
- val passwordChanges: Observable <String > = content.passwordEditText
17
+ val passwordChanges: Observable <String > = content.et_password
18
18
.textChanges()
19
19
.map { it.toString() }
20
- val loginClicks = content.loginBtn .clicks()
20
+ val loginClicks = content.btn_login .clicks()
21
21
22
22
// Props
23
- val loginEnabled = content.loginBtn .enabled()
23
+ val loginEnabled = content.btn_login .enabled()
24
24
}
Original file line number Diff line number Diff line change 25
25
android : layout_height =" wrap_content" >
26
26
27
27
<android .support.v7.widget.AppCompatEditText
28
- android : id =" @+id/emailEditText "
28
+ android : id =" @+id/et_email "
29
29
android : layout_width =" match_parent"
30
30
android : layout_height =" wrap_content"
31
31
android : hint =" @string/email"
37
37
android : layout_height =" wrap_content" >
38
38
39
39
<android .support.v7.widget.AppCompatEditText
40
- android : id =" @+id/passwordEditText "
40
+ android : id =" @+id/et_password "
41
41
android : layout_width =" match_parent"
42
42
android : layout_height =" wrap_content"
43
43
android : hint =" @string/password"
52
52
android : background =" @drawable/border_top" >
53
53
54
54
<Button
55
- android : id =" @+id/loginBtn "
55
+ android : id =" @+id/btn_login "
56
56
android : layout_width =" wrap_content"
57
57
android : layout_height =" wrap_content"
58
58
android : layout_alignParentEnd =" true"
You can’t perform that action at this time.
0 commit comments