Snackbar can't be asserted on espresso version 3.5.0-alpha01 and above.

Open
#1,752 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android
Domain
testing

Research direction

Start by reproducing the snackbar assertion with Espresso 3.5.1 and compare it with 3.5.0-alpha01 on Android SDK 30 or 32, using the reported onView and matches call. Inspect the assertion failure to locate the affected AndroidX Test component. Done means the message assertion passes on the updated Espresso version.

Written by the indexing model from the issue text.

Description

Description

I am trying to verify that my snackbar was shown with specific message but after updating Espresso version from 3.4.1 (which had issue with BottomSlidingPanel) to 3.5.1 I'm no longer able to verify the message that is shown in my snackbar.
I have done checks on multiple versions and can say that last version which snackbar assertions was working for me was 3.5.0-alpha01.

Steps to Reproduce

Here is how I'm verifying it:
onView(waitForVisibilityOf(withId(R.id.snackbar_text))).check(matches(withText(message)))
where message is a parameter that was passed from outside.

Expected Results

The test should pass on the updated version.

Actual Results

Test is failing.

AndroidX Test and Android OS Versions

Android SDK 30 and 32

Dominant language
Java
Stars
1.2k
Forks
342
Avg merge
1d 14h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from android/android-test

All issues in android/android-test

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.