I am curious about behind the scenes logic of Roles
. I do understand they do some cookies and local storage magic and I am guessing there is some window magic involved as well
I am guessing that because in one of our tests one of our window properties is disappearing, however without any code actively removing it. So I assume the Roles
after login will create a snapshot which is then being reapplied on top of every test case using useRole()
Any idea where could I find more details about this behavior, and how to instruct the testcafe
to wait for a particular action to finish before taking that snapshot?
All the examples are finishing the test by clicking on signInButton, I was thinking about waiting for an element to appear using something like t.expect(element.visible).ok();
which however seems a bit odd (running assertion in the beforeEach statement.