How to test if selecting a label causes an input to focus
We want to ensure that our form components labels are focusing inputs when selected. Our test looks like: We've tried a couple variations of https://spectrum.chat/testing-library/general/how-to-test-element-is-focused~abdca784-a6e9-4324-a7af-5432b128baf0 with no success.
Debug output too long for terminal
I'm unsure this issue is related to testing-library, but every time i write tests i stumble over it - so maybe one of you guys already solved it. Using debug() for a big component (in terms of html lines) only prints a part of the complete component in the terminal. Rest is…
Test that something is not on the page
I have a test similar to this one This works fine. I would like to do the opposite. I want to test non-admin can not open the modal. In this scenario the button is still on the page, it just doesn't open the modal on click. I'm aware I can do expect(queryByText('The modal…
Attempting to mock Firebase
Hey all, I want to test a component which calls firebase.auth().signOut() on click, so I want to test that firebase is being called onClick, but am not sure how to implement - I don't want to call the api in a test. Also, I am unsure if this is a valuable test. I would love some…