From bfdd78eb31e2cd1be5a4f23ad44c57ba0d6543ad Mon Sep 17 00:00:00 2001 From: duckception Date: Thu, 17 Aug 2023 17:18:51 +0200 Subject: [PATCH] Add test --- tests/e2e/specs/metamask-spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/e2e/specs/metamask-spec.js b/tests/e2e/specs/metamask-spec.js index ed8953e72..131583279 100644 --- a/tests/e2e/specs/metamask-spec.js +++ b/tests/e2e/specs/metamask-spec.js @@ -457,5 +457,12 @@ describe('Metamask', () => { expect(approved).to.be.true; }); }); + it(`allowToAddAndSwitchNetwork should switch network if this network was previously already added`, () => { + cy.changeMetamaskNetwork('mainnet'); + cy.get('#addEthereumChain').click(); + cy.allowMetamaskToAddAndSwitchNetwork().then(approved => { + expect(approved).to.be.true; + }); + }); }); });