Updating Android material version causes Firebase tests to fail for but still passes locally

50 Views Asked by At

Recently I updated com.google.android.material:material from 1.4.0 to 1.9.0 and noticed FTL tests on TextInputLayout with MaterialAutoCompleteTextView started to fail consistently.

After some version elimination, it happens between the transition from 1.5.0 -> 1.6.0-alpha01. Looking at the changelogs nothing really jumped out as the source of failure for FTL.

The test on FTL fails when it's trying to click on the TextInputLayout and verifying ExposedDropdownMenu child's text. From the video on FTL the test seems to hang and no drop down appears.

This passes locally, and passes on FTL on version 1.5.0 or lower.

onView(withId(R.id.textInputLayout)).perform(scrollTo(), click())
onView(withText("Dropdown Name")).inRoot(isPlatformPopup()).perform(click())

The failure on FTL is

 androidx.test.espresso.NoMatchingRootException: Matcher 'with decor view of type PopupWindow$PopupViewContainer' did not match any of the following roots: [Root{application-window-token=android.view.ViewRootImpl$W@ed50a71, window-token=android.view.ViewRootImpl$W@ed50a71, has-window-focus=true, layout-params-type=1, layout-params-string={(0,0)(fillxfill) ty=BASE_APPLICATION wanim=0x10302fe

The layout is pretty standard

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/textInputLayout"
    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:errorEnabled="false">

        <com.google.android.material.textfield.MaterialAutoCompleteTextView
            android:id="@+id/autoCompleteTextView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="none"/>

</com.google.android.material.textfield.TextInputLayout>

Any suggestions or explanations??

0

There are 0 best solutions below