testbench
testbench copied to clipboard
Make it possible to access template renderer parameter values
When creating a UI unit test for a Grid that uses a template renderer (i.e. LitRenderer
or the deprecated TemplateRenderer
), it's useful to find withProperty
values that were assigned for a specific cell.
As an example, I might have a column defined like this:
grid.addColumn(LitRenderer.<Person>of("Name: ${item.name}").withProperty("name", Person::getName));
For this grid, I would want to assert that the value of name
for a specific row is e.g. "John Doe"
.