Glad I could help. Maybe look at it like this. If it's hard for you to write a test then it will also be hard for people with a screen reader to navigate your app. This motivated me a lot to get more comfortable with accessibility.
What you're describing looks like this to me:
const{getByLabelText,getByRole}=render(<Form/>)fireEvent.change(getByLabelText('Text input'),{target:{value:'input value'}})fireEvent.focus(getByLabelText('Dropdown'))fireEvent.click(getByRole('option',{name:'The option you want to select'}))
Accessing the request is a tricky thing. However, we can make this more accessible in our tests as well. For instance, we've created a custom render method that fits our codebase. So when we use our custom render we can do more things:
We've taken what is complicated (getting the request) and turned it into a feature of our custom render wrapper so that developers can write tests more easily.
This can be true for a lot of things. redux, session handling, theming, etc... If something is very common in your app there is no rule that should keep you from extending your testing utilities.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Glad I could help. Maybe look at it like this. If it's hard for you to write a test then it will also be hard for people with a screen reader to navigate your app. This motivated me a lot to get more comfortable with accessibility.
What you're describing looks like this to me:
Accessing the request is a tricky thing. However, we can make this more accessible in our tests as well. For instance, we've created a custom
render
method that fits our codebase. So when we use our custom render we can do more things:We've taken what is complicated (getting the request) and turned it into a feature of our custom render wrapper so that developers can write tests more easily.
This can be true for a lot of things.
redux
, session handling, theming, etc... If something is very common in your app there is no rule that should keep you from extending your testing utilities.