Skip to content

test: add test case for #269 #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 9, 2021
Merged

test: add test case for #269 #271

merged 2 commits into from
Dec 9, 2021

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants