Here is my problem, step by step :)) I thought it was better read this way, unlike a wall with text, plaintively trying to explain my specific problem for the domain.
1) We have a Angular.jsc PHPsupported application MongoDB.
2) Protractorfor end-to-end tests.
3) It is necessary to test pages that modify the database, i.e. registration script - I look through all the stages of registration in the test, so db gets a new user record.
4) As expected, the test will fail with its launch, since db has an entry for the test user, and registration is not required - instead, the user is redirected to the main page.
I was thinking of getting a package MongoDBfor node.jsand interacting with the database in tests.
But this just doesn't seem right: the configuration files for connecting to the database are in the files PHPon the backend, while I am trying to write tests for the purely input part of our application.
Any ideas?
source
share