Skip to content

Commit

Permalink
Fix typo (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
alorma authored Jun 25, 2019
1 parent 259a1ea commit bb415f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import org.hamcrest.TypeSafeMatcher

object BaristaAssistiveTextAssertions {
@JvmStatic
fun assertAssitiveText(@IdRes viewId: Int, @StringRes text: Int) {
fun assertAssistiveText(@IdRes viewId: Int, @StringRes text: Int) {
val resourceString = InstrumentationRegistry.getTargetContext().resources.getString(text)
assertAssitiveText(viewId, resourceString)
assertAssistiveText(viewId, resourceString)
}

@JvmStatic
fun assertAssitiveText(@IdRes viewId: Int, text: String) {
fun assertAssistiveText(@IdRes viewId: Int, text: String) {
ViewMatchers.withId(viewId).assertAny(matchAssistiveText(text))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.schibsted.spain.barista.sample

import androidx.test.rule.ActivityTestRule
import androidx.test.runner.AndroidJUnit4
import com.schibsted.spain.barista.assertion.BaristaAssistiveTextAssertions.assertAssitiveText
import com.schibsted.spain.barista.assertion.BaristaAssistiveTextAssertions.assertAssistiveText
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand All @@ -15,11 +15,11 @@ class HelperTextTest {

@Test
fun assertHelperTextByString() {
assertAssitiveText(R.id.texthelper_inputlayout, "This is a sample helper text")
assertAssistiveText(R.id.texthelper_inputlayout, "This is a sample helper text")
}

@Test
fun assertHelperTextByResource() {
assertAssitiveText(R.id.texthelper_inputlayout, R.string.text_helper_text)
assertAssistiveText(R.id.texthelper_inputlayout, R.string.text_helper_text)
}
}

0 comments on commit bb415f9

Please sign in to comment.