AdevintaSpain/Barista

assertHasBackground doesn't work with colors

rocboronat opened this issue · 1 comments

Library Version:

3.6.0 (the latest one right now)

Describe the Bug:

When checking if a View has a background passing a R.color.something, Barista fails. This is the error it gives:

com.schibsted.spain.barista.internal.failurehandler.BaristaException: View (with id: com.fewlaps.app.debug:id/view) didn't match condition (with background from resource id: <2131034144>[background_warning])

Steps to reproduce the bug:

  1. Make an assertion like this one: assertHasBackground(R.id.view, R.color.background_warning);

Expected Behavior:

The assertion passes if the background is applied, and fails otherwise.

Just pushed a branch that reproduces this issue. Long life to EDD!

https://github.com/AdevintaSpain/Barista/tree/assert-background-with-color