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

Create AutoCompleteTextView sample #115

Merged
merged 5 commits into from Dec 7, 2018
Merged

Create AutoCompleteTextView sample #115

merged 5 commits into from Dec 7, 2018

Conversation

ashdavies
Copy link
Contributor

@ashdavies ashdavies commented Sep 3, 2018

With reference to issue #42 this provides a sample demo for the AutoCompleteTextView usage with a DecorPopupView which is currently unsuccessful.

Stack trace indicates that the platform popup view is not present in the view hierarchy, or that assertions are being made against the wrong window.

android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (an instance of android.widget.ListView)

View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION wanim=0x10302f8
fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1813, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@db771, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+-->ViewStub{id=16908682, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@621b956, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+-->FrameLayout{id=-1, visibility=VISIBLE, width=1080, height=1760, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@59ad6c4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=53.0, child-count=1}
|
+--->ActionBarOverlayLayout{id=2131230774, res-name=decor_content_parent, visibility=VISIBLE, width=1080, height=1760, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@ff559ad, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+---->ContentFrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1635, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.ActionBarOverlayLayout$LayoutParams@e9f073, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=125.0, child-count=1}
|
+----->AppCompatAutoCompleteTextView{id=2131230753, res-name=auto_complete_view, visibility=VISIBLE, width=1080, height=100, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@1269d2e, tag=null, root-is-layout-requested=false, has-input-connection=true, editor-info=[inputType=0x30001 imeOptions=0x40000006 privateImeOptions=null actionLabel=null actionId=0 initialSelStart=5 initialSelEnd=5 initialCapsMode=0x0 hintText=null label=null packageName=null fieldId=0 fieldName=null extras=null hintLocales=null contentMimeTypes=null ], x=0.0, y=0.0, text=Title, input-type=196609, ime-target=true, has-links=false}
|
+---->ActionBarContainer{id=2131230729, res-name=action_bar_container, visibility=VISIBLE, width=1080, height=125, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.ActionBarOverlayLayout$LayoutParams@2351165, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+----->Toolbar{id=2131230727, res-name=action_bar, visibility=VISIBLE, width=1080, height=125, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@5035e3a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+------>AppCompatTextView{id=-1, visibility=VISIBLE, width=447, height=61, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.Toolbar$LayoutParams@400faeb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=35.0, y=32.0, text=Autocomplete Activity, input-type=0, ime-target=false, has-links=false}
|
+------>ActionMenuView{id=-1, visibility=VISIBLE, width=0, height=125, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.Toolbar$LayoutParams@da0a048, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1080.0, y=0.0, child-count=0}
|
+----->ActionBarContextView{id=2131230735, res-name=action_context_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@dea5ee1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+->View{id=16908336, res-name=navigationBarBackground, visibility=VISIBLE, width=1080, height=107, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@8b92406, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1813.0}
|
+->View{id=16908335, res-name=statusBarBackground, visibility=VISIBLE, width=1080, height=53, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2725ac7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1538)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:90)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:206)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:203)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:223)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:198)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:241)
at android.support.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:143)
at android.support.test.espresso.DataInteraction.check(DataInteraction.java:137)
at com.agoda.kakao.KAdapterItem.<init>(Views.kt:830)
at com.agoda.sample.screen.AutoCompleteActivityScreen$Item.<init>(AutoCompleteActivityScreen.kt:22)
at com.agoda.sample.screen.AutoCompleteActivityScreen$list$2$1.invoke(AutoCompleteActivityScreen.kt:20)
at com.agoda.sample.screen.AutoCompleteActivityScreen$list$2$1.invoke(AutoCompleteActivityScreen.kt:12)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1$2.invoke(AutoCompleteTest.kt:81)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1$2.invoke(AutoCompleteTest.kt:11)
at com.agoda.kakao.KListView.invoke(Views.kt:485)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1.invoke(AutoCompleteTest.kt:26)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1.invoke(AutoCompleteTest.kt:11)
at com.agoda.kakao.Screen.invoke(Screen.kt:21)
at com.agoda.sample.AutoCompleteTest.testContentItemsListView(AutoCompleteTest.kt:20)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145)

It can also be noted that introducing the following to the KListView builder is also unsuccessful.

withParent {
    isRoot()
}

@CLAassistant
Copy link

CLAassistant commented Sep 3, 2018

CLA assistant check
All committers have signed the CLA.

@Unlimity
Copy link
Member

Unlimity commented Nov 7, 2018

I had some time to see into problem. If you look closer to the stack trace, you can see that it fails when trying to access list's item. It means, that your isVisible() and hasSize() are actually passing just fine. The problem comes with accessing children, since Kakao do not pass root matcher to children in list and recycler. I will see if I can add such support, but for now, accessing list's children is impossible with Kakao.

@Unlimity
Copy link
Member

Unlimity commented Nov 8, 2018

I pulled my last enhancement from master that I did, I hope now your functionality will be covered

@Unlimity
Copy link
Member

Unlimity commented Nov 8, 2018

@ashdavies So, there are some issues with your PR, but in general now list item view is trying to match in the correct window, according to new stack trace:

android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: ((with id: android:id/text1) and is descendant of a:  displaying data matching: ANYTHING within adapter view matching: (an instance of android.widget.ListView))
If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from one of the following AdapterViews:android.widget.ListPopupWindow$DropDownListView{1cfbc843 VFED.VC. ........ 0,0-1440,1680}

View Hierarchy:
+>PopupViewContainer{id=-1, visibility=VISIBLE, width=1440, height=1680, has-focus=true, has-focusable=true, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=WM.LayoutParams{(0,421)(1440x1680) gr=#10000033 sim=#10 ty=1000 fl=#1860208 fmt=-3 wanim=0x10302db surfaceInsets=Rect(0, 0 - 0, 0)}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->DropDownListView{id=-1, visibility=VISIBLE, width=1440, height=1680, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@28c3a997, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=10}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@3ac56784, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Title 1, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@3faf7b6d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=168.0, text=Title 2, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@38a0f3a2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=336.0, text=Title 3, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@380f4833, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=504.0, text=Title 4, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@10f377f0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=672.0, text=Title 5, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@19d56169, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=840.0, text=Title 6, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@3bea7ee, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1008.0, text=Title 7, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@3f6c348f, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1176.0, text=Title 8, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@2eb0231c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1344.0, text=Title 9, input-type=0, ime-target=false, has-links=false}
|
+-->AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=1440, height=168, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@f59ab25, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1512.0, text=Title 10, input-type=0, ime-target=false, has-links=false}
|
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:580)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:90)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.check(ViewInteraction.java:291)
at android.support.test.espresso.DataInteraction.check(DataInteraction.java:137)
at com.agoda.kakao.KBaseView.<init>(Views.kt:70)
at com.agoda.kakao.KTextView.<init>(Views.kt:132)
at com.agoda.sample.screen.AutoCompleteActivityScreen$Item.<init>(AutoCompleteActivityScreen.kt:23)
at com.agoda.sample.screen.AutoCompleteActivityScreen$list$2$1.invoke(AutoCompleteActivityScreen.kt:20)
at com.agoda.sample.screen.AutoCompleteActivityScreen$list$2$1.invoke(AutoCompleteActivityScreen.kt:12)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1$2.invoke(AutoCompleteTest.kt:84)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1$2.invoke(AutoCompleteTest.kt:11)
at com.agoda.kakao.KListView.invoke(Views.kt:491)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1.invoke(AutoCompleteTest.kt:26)
at com.agoda.sample.AutoCompleteTest$testContentItemsListView$1.invoke(AutoCompleteTest.kt:11)
at com.agoda.kakao.Screen.invoke(Screen.kt:21)
at com.agoda.sample.AutoCompleteTest.testContentItemsListView(AutoCompleteTest.kt:20)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1837)

@ashdavies
Copy link
Contributor Author

I believe there was an issue with the view matcher because it was trying to match a child view of the list item, but was inflating android.R.layout.simple_list_item_1 which doesn't have any children, hopefully this should resolve it

@Unlimity
Copy link
Member

Unlimity commented Dec 6, 2018

Ok, so your autocomplete now passes, but please modify TestActivityScreen and fix button id, since you changed it in layout from button to recycler.

@ashdavies
Copy link
Contributor Author

Whoops! I missed that one, thanks for the hint

Copy link
Member

@Unlimity Unlimity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now looks legit. I'm happy that we could resolve you issue (if we did) 👍

@ashdavies
Copy link
Contributor Author

Great! I've not yet tried it with our production repository, but I'm confident that it will resolve the issue, thanks for your help! 😄

@Unlimity Unlimity merged commit 9eb8e57 into agoda-com:master Dec 7, 2018
@ashdavies ashdavies deleted the auto-complete-test branch December 7, 2018 09:50
@ashdavies
Copy link
Contributor Author

🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants