I'm trying to write a test with testcafe that could generate conflicts in a document. For this I would need to be logged in with 2 different users in 2 different browser sessions (One being an incognito window) and open up the documents editor with each user and edit the same text. It is important that both users are in the editor when editing the content in order to generate conflicts.
Is there a way to open multiple browser sessions in 1 testcafe test? Or an alternative solution for manipulating a doc with the 2 different user roles at the same time?
How the test would look like:
- Open browser window
- Log in with User1
- Navigate to document editor (Tinymce)
- Open incognito browser (without closing the 1st window)
- Log in with User2
- Navigate to document editor
- With User1 edit "text" to "purple" then save
- With User2 edit "text" to "gold" then save
- Assert that conflict happens