I am testing a React website, and this is my first time. In my page, I have to enter a string containing spaces before and after the actual search string, to simulate real user behavior. The React front-end treats the string, trimming it, before sending a request to a REST endpoint.
So the scenario is=
- I navigate to the search page
- I enter a String containing starting and ending spaces
- I verify in the request that the front-end sends to the back-end, string doesn’t contain starting or ending spaces.
How can I do this? Up to now, I have done pure web test or pure rest test, but this looks quite different from what I have done up to now, and I have few tests like this one. The logic executes in the front-end and then sends the REST request.
Has anybody done this type of tests?
Any help is welcome.