Reputation: 31
I'm writing the script in testcafe to parse the response and verify, that response contains required text, nut getting an error: Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.
test ('Control server info', async () => {
await t
.click(infoserver.serverinfoButton)
.click(infoserver.getInfoButton)
await infoserver.resultText.value.then( async (res) => {
const infoParse = JSON.parse(res);
console.log(infoParse);
await t
.expect(infoParse.username).contains('Google:[email protected]');
});
});
Upvotes: 3
Views: 2728