You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using signals in render template should automatically apply to component #517
Only model can be updated, which would require us to change our components from input for anything we want to test, which is not ideal
Manually interacting with the underlying values like that is testing implementation details
The template syntax in render doesn't expose an underlying componentRef to call setInput on
In an ideal world, the template will automatically update when the signal changes, like we'd expect in angular template HTML:
Preferred API:
it("should render text from a signal",async()=>{constsomeSignal=signal("hello");awaitrender(html`<spandata-testid="value">{{ someSignal() }} world</span>`,{componentProperties: {
someSignal,},},);// Passesexpect(screen.getByTestId("value")).toHaveTextContent("hello world");someSignal.set("updated");// Failsexpect(screen.getByTestId("value")).toHaveTextContent("updated world");});
Hello, sorry I missed the notification for this issue.
I agree that would be nice to do, unfortunately Angular's setInput API doesn't work nicely with Signals.
Because of this, it doesn't work for ATL and I don't think it's a good idea to patch this behavior on our side.
For now, you should be able to work around it by accessing the signal through the test fixture.
Activity
timdeschryver commentedon Feb 26, 2025
Hello, sorry I missed the notification for this issue.
I agree that would be nice to do, unfortunately Angular's
setInputAPI doesn't work nicely with Signals.Because of this, it doesn't work for ATL and I don't think it's a good idea to patch this behavior on our side.
For now, you should be able to work around it by accessing the signal through the test fixture.
https://github.com/testing-library/angular-testing-library/blob/main/apps/example-app/src/app/examples/22-signal-inputs.component.spec.ts#L45
timdeschryver commentedon Oct 21, 2025
This should be fixed by #547