Skip to content

Commit

Permalink
sign script updated
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorgabriel committed Sep 29, 2023
1 parent eab556f commit edbf2b5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cypress/e2e/SignMessage/SignMessage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Routes } from 'react-router-dom';
import { userData } from '../../assets/globalData';
import { RoutesEnum, walletIDEnum } from '../../constants/enums';
import { AssertionEnum, RoutesEnum, walletIDEnum } from '../../constants/enums';
import { scSelectors } from '../SCTransactions/SCTransactionData';

describe('Sign Message', () => {
Expand All @@ -11,19 +11,21 @@ describe('Sign Message', () => {
it('should sign', () => {
const widgetInfo = ['Signature', 'Encoded message', 'Decoded message'];
cy.getSelector('signMsgBtn').should('be.disabled');
cy.get('textarea').type('Test');
cy.get('textarea').first().type('Test');
cy.getSelector('signMsgBtn').click();
cy.getSelector(scSelectors.accesPass).type(userData.passsword);
cy.getSelector(scSelectors.submitButton).click();
cy.getSelector('message').should('have.value', 'Test');
cy.getSelector('signButton').click();
cy.checkWidgetMsg(widgetInfo);
widgetInfo.forEach((element) => {
cy.get('label').should(AssertionEnum.contain, element);
});
cy.getSelector('closeTransactionSuccessBtn').click();
cy.getSelector('signMsgBtn').should('be.disabled');
});

it('should not sign', () => {
cy.get('textarea').type('Test');
cy.get('textarea').first().type('Test');
cy.getSelector('signMsgBtn').click();
cy.wait(2000);
cy.getSelector(scSelectors.accesPass).type(userData.passsword);
Expand Down

0 comments on commit edbf2b5

Please sign in to comment.