I've been working with Testcafe and have had some issues working with multiple "Fixtures" or "Tests" from within the same "file".
IE TESTFILE.js:
fixture `Test Fixture #1`
.page `http://www.testpage.com`
test('Testing Test #1', async t => {
await t
.useRole(partnerAdmin)
await t
.expect(Selector(Games.gamesList).exists).ok()
.expect(Selector(Games.topRowGame).exists).ok()
.click(Games.gameActionsBtn)
});
fixture `Test Fixture #2`
.page `http://www.testpage.com`
test('Testing Test #2', async t => {
await t
.useRole(partnerAdmin)
await t
// DO STUFF
});
When I try this the 1st fixture will run perfectly... HOWEVER, the 2nd Fixture will stop at the login page.
I'm using the Roles as I have expected them to work... (janky but i "guess" it works.)
It doesn't matter the order I place the "Fixtures" or "Tests" in. I can literally swap the 2nd fixture above to before the 1st and it still does the same thing. The first runs, but the second just straight up fails as if it can't remember what it just did.
Anyone have any idea what i might be missing here? I'm using Roles and page models that seem to be working normally but the first test runs but fails to continue on through the second for some reason even if I did just duplicate the same login/roles setup.
Aucun commentaire:
Enregistrer un commentaire