I am working on a Rails + React application and studying frontal tests. Unlike basic tests, this does not seem to be a simple process with an obvious path. There is a list of possible ways to achieve this and they all seem to be testing in a very different way.
The methods I found are:
Import the js files and run the functions inside and check the return values. This seems to be the easiest thing to do, but very little of our code js simply takes values and returns something so that few applications can be tested this way.
Use of libraries such as enzyme to simulate rendering and simulation of reactive component interactions Also includes storage of simulated responses that the server would send to load them into the test
Running the entire backend, frontend and browser using selenium and automating the process of using the application in a real-world environment
I do not know these libraries very well, so it's hard to determine their limitations and strengths, but I have a list of requirements and sample scenarios for what the tests should do.
These examples are:
Update libraries such as react / jquery and see if anything in the application goes down. Selenium would probably work for this, but I do not think that emulated component rendering libraries will be so because I do not think they really import any libraries like jquery when running. a test.
Update an item and see if all the features of that item are still working.
Most of the bugs I've encountered have the result that something does not work properly when you interact with it, as if a button does not perform a function, because jquery should have been updated. I do not see how, except selenium, it could be taken. Are there any other options that I should consider or more information on the ones I've listed that would allow them to do what I need?