From c2562ee3d0b0a1f2bf4ced66e40818e9ac04d0b7 Mon Sep 17 00:00:00 2001 From: Curtis Date: Thu, 24 Oct 2024 19:24:23 -0400 Subject: [PATCH] undo changes made to the portfolio test --- .../portfolio-connect-account.failing.js | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 e2e/specs/quarantine/portfolio-connect-account.failing.js diff --git a/e2e/specs/quarantine/portfolio-connect-account.failing.js b/e2e/specs/quarantine/portfolio-connect-account.failing.js new file mode 100644 index 00000000000..70bf066fa6b --- /dev/null +++ b/e2e/specs/quarantine/portfolio-connect-account.failing.js @@ -0,0 +1,66 @@ +'use strict'; +import { SmokeCore } from '../../tags'; +import TabBarComponent from '../../pages/TabBarComponent'; +import { loginToApp } from '../../viewHelper'; +import { + loadFixture, + startFixtureServer, + stopFixtureServer, +} from '../../fixtures/fixture-helper'; +import FixtureBuilder from '../../fixtures/fixture-builder'; +import TestHelpers from '../../helpers'; +import WalletView from '../../pages/wallet/WalletView'; +import { getFixturesServerPort } from '../../fixtures/utils'; +import FixtureServer from '../../fixtures/fixture-server'; +import BrowserView from '../../pages/Browser/BrowserView'; +import PortfolioHomePage from '../../pages/Browser/PortfolioHomePage'; +import Assertions from '../../utils/Assertions'; +import ConnectModal from '../../pages/modals/ConnectModal'; +const fixtureServer = new FixtureServer(); +describe(SmokeCore('Connect account to Portfolio'), () => { + beforeAll(async () => { + await TestHelpers.reverseServerPort(); + const fixture = new FixtureBuilder().withKeyringController().build(); + fixture.state.user.seedphraseBackedUp = false; + await startFixtureServer(fixtureServer); + await loadFixture(fixtureServer, { fixture }); + await device.launchApp({ + permissions: { notifications: 'YES' }, + launchArgs: { fixtureServerPort: `${getFixturesServerPort()}` }, + }); + }); + afterAll(async () => { + await stopFixtureServer(fixtureServer); + }); + + it('should connect wallet account to portfolio', async () => { + await loginToApp(); + await Assertions.checkIfVisible(WalletView.container); + await TabBarComponent.tapBrowser(); + await BrowserView.tapOpenAllTabsButton(); + await BrowserView.tapCloseTabsButton(); + await Assertions.checkIfVisible(BrowserView.noTabsMessage); + await TabBarComponent.tapWallet(); + await WalletView.tapPortfolio(); + await BrowserView.waitForBrowserPageToLoad(); + + try { + await PortfolioHomePage.closePrivacyModal(); + } catch { + /* eslint-disable no-console */ + console.log('The Portfolio privacy modal is not visible'); + } + await device.disableSynchronization(); + await PortfolioHomePage.tapConnectMetaMask(); + await ConnectModal.tapConnectButton(); + await device.enableSynchronization(); + }); + + it('should not open additional browser tabs to portfolio', async () => { + await Assertions.checkIfElementToHaveText(BrowserView.tabsNumber, '1'); + await TabBarComponent.tapWallet(); + await WalletView.tapPortfolio(); + await BrowserView.waitForBrowserPageToLoad(); + await Assertions.checkIfElementToHaveText(BrowserView.tabsNumber, '1'); + }); +});