diff --git a/packages/frontend/cypress/e2e/step0.cy.ts b/packages/frontend/cypress/e2e/step0.cy.ts index b6780c1..8c74d5b 100644 --- a/packages/frontend/cypress/e2e/step0.cy.ts +++ b/packages/frontend/cypress/e2e/step0.cy.ts @@ -45,7 +45,7 @@ describe('Multistep form step-0 after MetaMask connect', () => { ) }) - it('should list Topos, Incal, and Edena', () => { + it('should list Topos, and Incal', () => { cy.get('#sendingSubnet').click() cy.get('.ant-select-item-option-content') .contains('Topos') @@ -53,9 +53,6 @@ describe('Multistep form step-0 after MetaMask connect', () => { cy.get('.ant-select-item-option-content') .contains('Incal') .should('be.visible') - cy.get('.ant-select-item-option-content') - .contains('Edena') - .should('be.visible') }) it('should open MetaMask to add Topos network when click on Topos', () => { @@ -72,13 +69,6 @@ describe('Multistep form step-0 after MetaMask connect', () => { cy.allowMetamaskToAddAndSwitchNetwork() }) - it('should open MetaMask to add Edena network when click on Edena', () => { - cy.get('#sendingSubnet').click() - cy.get('.ant-select-item-option-content').contains('Edena').click() - cy.get('.ant-select-selection-item').should('have.text', 'Edena') - cy.allowMetamaskToAddAndSwitchNetwork() - }) - it('should not ask to add networks when switching back to them', () => { cy.get('#sendingSubnet').click() cy.get('.ant-select-item-option-content').contains('Topos').click() @@ -87,10 +77,6 @@ describe('Multistep form step-0 after MetaMask connect', () => { cy.get('#sendingSubnet').click({ force: true }) cy.get('.ant-select-item-option-content').contains('Incal').click() cy.allowMetamaskToSwitchNetwork() - - cy.get('#sendingSubnet').click({ force: true }) - cy.get('.ant-select-item-option-content').contains('Edena').click() - cy.allowMetamaskToSwitchNetwork() }) it('should invalidate form if trying to next without sending subnet', () => { diff --git a/packages/frontend/cypress/e2e/step1.cy.ts b/packages/frontend/cypress/e2e/step1.cy.ts index 52f9360..e109aae 100644 --- a/packages/frontend/cypress/e2e/step1.cy.ts +++ b/packages/frontend/cypress/e2e/step1.cy.ts @@ -173,6 +173,30 @@ describe('Multistep form step-1 with Topos', () => { .contains(SUCCESS.REGISTERED_TOKEN) .should('be.visible') }) + + it('should invalidate form if token not registered on selected receiving subnet', () => { + cy.get('#token').click() + cy.wait(500) + cy.get('#token_list') + .parent() + .find('.ant-select-item-option-content') + .contains('TST') + .click() + cy.get('#receivingSubnet').click() + cy.wait(500) + cy.get('#receivingSubnet_list') + .parent() + .find('.ant-select-item-option-content') + .contains('Incal') + .click() + cy.get('#receivingSubnet') + .parents('.ant-form-item') + .should('have.class', 'ant-form-item-has-error') + cy.get('#receivingSubnet_help').should( + 'have.text', + `TST is not registered on Incal!` + ) + }) }) describe('Multistep form step-1 with Incal', () => { @@ -251,23 +275,6 @@ describe('Multistep form step-1 with Incal', () => { cy.get('#amount_help').should('have.text', ERROR.MISSING_AMOUNT) }) - it('should invalidate form if token not registered on selected receiving subnet', () => { - cy.get('#receivingSubnet').click() - cy.wait(500) - cy.get('#receivingSubnet_list') - .parent() - .find('.ant-select-item-option-content') - .contains('Edena') - .click() - cy.get('#receivingSubnet') - .parents('.ant-form-item') - .should('have.class', 'ant-form-item-has-error') - cy.get('#receivingSubnet_help').should( - 'have.text', - `TST is not registered on Edena!` - ) - }) - it('should invalidate form if address is invalid', () => { cy.get('#recipientAddress').type('this is an invalid address') cy.get('#recipientAddress') diff --git a/packages/frontend/src/components/MultiStepForm.tsx b/packages/frontend/src/components/MultiStepForm.tsx index f809f96..9884082 100644 --- a/packages/frontend/src/components/MultiStepForm.tsx +++ b/packages/frontend/src/components/MultiStepForm.tsx @@ -22,7 +22,7 @@ export interface StepProps { } export enum TransactionType { - ASSET_TRANSFER = 'Asset Transfer', + ASSET_TRANSFER = 'ERC20 Token Transfer', // SMART_CONTRACT_CALL = 'Smart Contract Call', }