Barista icon indicating copy to clipboard operation
Barista copied to clipboard

Failing UI tests on API 31

Open IanArb opened this issue 2 years ago • 0 comments

Describe the Bug: There are failing UI tests on API 31 on CI workflow runs. It seems to be flaky on CI environment and could be related to material components as per the test case failures.

Tests that are failing:

> Task :sample:connectedDebugAndroidTest

com.adevinta.android.barista.sample.ClickTest > checkClickWhenParentIsNotAnScrollView_byText[test(AVD) - 12] FAILED 
	com.adevinta.android.barista.internal.failurehandler.BaristaException: No view matching ((an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Hi! I'm the second screen!" or (view.getParent() is assignable from class <class com.google.android.material.textfield.TextInputLayout> and (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Hi! I'm the second screen!")))) was found
	at com.adevinta.android.barista.internal.failurehandler.SpyFailureHandler.resendFirstError(SpyFailureHandler.kt:25)

com.adevinta.android.barista.sample.ClickTest > checkClick_byStringResource[test(AVD) - 12] FAILED 
	com.adevinta.android.barista.internal.failurehandler.BaristaException: No view matching ((an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Hi! I'm the second screen!" or (view.getParent() is assignable from class <class com.google.android.material.textfield.TextInputLayout> and (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Hi! I'm the second screen!")))) was found
	at com.adevinta.android.barista.internal.failurehandler.SpyFailureHandler.resendFirstError(SpyFailureHandler.kt:25)

com.adevinta.android.barista.sample.ClickTest > checkClickWhenParentIsNotAnScrollView_byId[test(AVD) - 12] FAILED 
	com.adevinta.android.barista.internal.failurehandler.BaristaException: No view matching ((an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Hi! I'm the second screen!" or (view.getParent() is assignable from class <class com.google.android.material.textfield.TextInputLayout> and (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Hi! I'm the second screen!")))) was found
	at com.adevinta.android.barista.internal.failurehandler.SpyFailureHandler.resendFirstError(SpyFailureHandler.kt:25)

A clear description of what is the bug is.

Steps to reproduce the bug:

  1. Create a PR
  2. Wait for API 31 test results

Expected Behavior: Tests should pass.

A clear description of what you expected to happen. The tests should not be flaky and be able to pass on first run in CI.

IanArb avatar Mar 04 '22 08:03 IanArb