I have a question on how to implement behat/mink functional tests. In my web app, I have users that can access some data sheets if they have the required credentials (i.e. no access/ read only / write).
I want to be able to test all the possible contexts via behat/mink. The question is what is the best practice for such testing ? Some dev told me that I have to create a scenario for each type of user I would like to use. Then, I will have to use the user I created in others tests. But I am not very confortable with this idea : I believe that it introduces coupling between my tests. If the test that creates the user fails, then the test that checks the access over my datasheet for that specific user will also fail.
So, I believed that I could use some fixtures : before testing my app, I run a script that will insert me all the profiles I need. I will have some tests dedicated for creating users, and I will use the fixtures to check if a specific user is allowed to access a specific datasheet. The counterpart with this solution is that I will have to maintain the fixtures set.
Do you have any suggestion / idea ?