Skip to content

Commit

Permalink
feat: added test for transaction rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad committed Mar 4, 2024
1 parent 05d1f1e commit 8d115e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/e2e/specs/keplr/keplr-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ describe('Keplr', () => {
expect(taskCompleted).to.be.true;
});
});
it(`should rejct make an offer transaction`, () => {
const alertShown = cy.stub().as('alertShown');
cy.on('window:alert', alertShown);

cy.contains('Make an Offer').click();
cy.rejectTransaction().then(taskCompleted => {
expect(taskCompleted).to.be.true;
});

cy.get('@alertShown').should(
'have.been.calledOnceWith',
'Offer error: Error: Request rejected',
);
});
it(`should confirm make an offer transaction`, () => {
const alertShown = cy.stub().as('alertShown');
cy.on('window:alert', alertShown);
Expand Down

0 comments on commit 8d115e2

Please sign in to comment.