Problem/Motivation

When a UpdatePathTestBase-based test fails because there is an outstanding change to a field definition of an entity type it fails with an error message that doesn't contain the entity type, for example:

The Published field needs to be updated.

This is not super helpful.

Proposed resolution

Add the entity type label to the error message:

Custom block: The Published field needs to be updated.

Comments

tstoeckler created an issue. See original summary.

tstoeckler’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

Here we go. Note that I fetched the entity type's label because that seemed to be more inline with the rest of the message's style. Also getChangeSummary() also fetches the label in the same way, so that if something goes super wrong and the entity type does not exist, this does not make it worse. I don't feel strongly about this, though, if people think we should rather just display the entity type ID.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me, and very helpful as well :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed d2d499546c to 8.6.x and b70979d923 to 8.5.x. Thanks!

Backported to 8.5.x since this is a test only change.

  • alexpott committed 593ded0 on 8.6.x
    Issue #2973299 by tstoeckler: Add the label of the entity type to the...

  • alexpott committed d84e2dd on 8.5.x
    Issue #2973299 by tstoeckler: Add the label of the entity type to the...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.