diff --git a/cypress/e2e/SignMessage/SignMessage.cy.ts b/cypress/e2e/SignMessage/SignMessage.cy.ts index 3a8dda6b..69f2f9b0 100644 --- a/cypress/e2e/SignMessage/SignMessage.cy.ts +++ b/cypress/e2e/SignMessage/SignMessage.cy.ts @@ -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', () => { @@ -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);