Skip to content

Conversation

timdeschryver
Copy link
Member

@the-ult I've added a workaround in the test cases.

Do you see a possible solution so we don't require this workaround?

@the-ult
Copy link
Contributor

the-ult commented Dec 6, 2021

No, I did not see any other solution. But this seems pretty legit. Adding it to the componentProperties

Maybe add it as an example test to the example-app itself, instead of an issue test? (harder to find )

@timdeschryver
Copy link
Member Author

I think this example already covers that https://github.com/testing-library/angular-testing-library/blob/main/apps/example-app/src/app/examples/08-directive.spec.ts#L28, thoughts?

Also, passing in the props in the template should work. The problem that you experiences is specific because you had html entities in the string... For example, if you just use a simple string with the uppercase pipe, the string gets transormed.

@the-ult
Copy link
Contributor

the-ult commented Dec 7, 2021

For example, if you just use a simple string with the uppercase pipe, the string gets transormed

Yes indeed, that works without any problems.
Which is why I thought this could be a bug 😇

I think it is not obvious in the directive example, that in case of HTML entities in a string. You'll need to use the componentProperties

Maybe we could add the current HTML string test/pipe as well?

@timdeschryver
Copy link
Member Author

@the-ult thanks for the feedback, I've moved it to the examples folder.

@timdeschryver timdeschryver merged commit a9237f2 into main Dec 9, 2021
@timdeschryver timdeschryver deleted the 269 branch December 9, 2021 14:53
@github-actions
Copy link

🎉 This PR is included in version 11.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants