Reputation: 25
test('should amount field and name field reset after submit', async ()=>{
const amountInput = await Selector('.amount');
await t.typeText(input, 10);
const nameInput = await Selector('.name');
await t.typeText(input, "test");
await t.click(Selector('button'));
await t.click(Selector('transfer'));
after calling api...
showing error modal
})
I am using TestCafe for automation testing. After clicking on the transfer button, I want to simulate an API or network error to display the error modal. Then, will close the modal to verify that the input values are not reset.
Upvotes: 0
Views: 24