Skip to content

Commit

Permalink
undo changes made to the portfolio test
Browse files Browse the repository at this point in the history
  • Loading branch information
cortisiko committed Oct 24, 2024
1 parent 965f640 commit c2562ee
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions e2e/specs/quarantine/portfolio-connect-account.failing.js
Original file line number Diff line number Diff line change
@@ -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');
});
});

0 comments on commit c2562ee

Please sign in to comment.