Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ff from CI, move some things around #1666

Closed
wants to merge 14 commits into from
Closed
32 changes: 31 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,36 @@ jobs:
# if: steps.FFE2eDappInteractions.outcome == 'failure'
# run: exit 1
# CHROME TESTS

chrome-e2e-onboarding:
runs-on: ubuntu-latest
timeout-minutes: 18
needs: [build]
env:
DISPLAY: :0
VITEST_SEGFAULT_RETRY: 4
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/chromeTestsSetup
with:
gh-access-token: ${{ secrets.DOTENV_GITHUB_ACCESS_TOKEN }}
- name: Run e2e onboarding (Chrome)
id: ChromeE2EOnboarding
continue-on-error: true
run: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:onboarding
- name: Upload deps artifacts
if: steps.ChromeE2EOnboarding.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: screenshots
path: screenshots/
- name: Fail if any tests failed
if: steps.ChromeE2EOnboarding.outcome == 'failure'
run: exit 1
chrome-e2e-parallel:
runs-on: beefy-runner-bx
timeout-minutes: 18
Expand Down Expand Up @@ -455,7 +485,7 @@ jobs:
run: yarn typecheck
cleanup:
runs-on: ubuntu-latest
needs: [chrome-e2e-parallel, chrome-e2e-swap, chrome-e2e-send, chrome-e2e-dappInteractions, chrome-optimism-e2e-send, unit-tests, ci-checks]
needs: [chrome-e2e-onboarding, chrome-e2e-parallel, chrome-e2e-swap, chrome-e2e-send, chrome-e2e-dappInteractions, chrome-optimism-e2e-send, unit-tests, ci-checks]
steps:
- uses: geekyeggo/delete-artifact@v5
with:
Expand Down
71 changes: 34 additions & 37 deletions e2e/parallel/LedgerImportFlow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,40 @@ let driver: WebDriver;
const browser = process.env.BROWSER || 'chrome';
const os = process.env.OS || 'mac';

describe.runIf(browser !== 'firefox')(
'Import wallet with a Ledger hw wallet',
() => {
beforeAll(async () => {
driver = await initDriverWithOptions({
browser,
os,
});
const extensionId = await getExtensionIdByName(driver, 'Rainbow');
if (!extensionId) throw new Error('Extension not found');
rootURL += extensionId;
describe('Import wallet with a Ledger hw wallet', () => {
beforeAll(async () => {
driver = await initDriverWithOptions({
browser,
os,
});
afterAll(async () => driver.quit());

it('should be able import a wallet via hw wallet', async () => {
await importHardwareWalletFlow(driver, rootURL, 'ledger');
});

it('should display account 0 name', async () => {
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_1);
const extensionId = await getExtensionIdByName(driver, 'Rainbow');
if (!extensionId) throw new Error('Extension not found');
rootURL += extensionId;
});
afterAll(async () => driver.quit());

it('should be able import a wallet via hw wallet', async () => {
await importHardwareWalletFlow(driver, rootURL, 'ledger');
});

it('should display account 0 name', async () => {
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_1);
});

it('should display hw label on wallet switcher screen', async () => {
await findElementByIdAndClick({
id: 'header-account-name-shuffle',
driver,
});

it('should display hw label on wallet switcher screen', async () => {
await findElementByIdAndClick({
id: 'header-account-name-shuffle',
driver,
});
const hwLabel = await findElementByText(driver, 'Ledger');
expect(hwLabel).toBeTruthy();
});

it('should display account 1 name', async () => {
await findElementByTestIdAndClick({
id: 'wallet-account-2',
driver,
});
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_2);
const hwLabel = await findElementByText(driver, 'Ledger');
expect(hwLabel).toBeTruthy();
});

it('should display account 1 name', async () => {
await findElementByTestIdAndClick({
id: 'wallet-account-2',
driver,
});
},
);
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_2);
});
});
71 changes: 34 additions & 37 deletions e2e/parallel/TrezorImportFlow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,40 @@ let driver: WebDriver;
const browser = process.env.BROWSER || 'chrome';
const os = process.env.OS || 'mac';

describe.runIf(browser !== 'firefox')(
'Import wallet with a Trezor hw wallet',
() => {
beforeAll(async () => {
driver = await initDriverWithOptions({
browser,
os,
});
const extensionId = await getExtensionIdByName(driver, 'Rainbow');
if (!extensionId) throw new Error('Extension not found');
rootURL += extensionId;
describe('Import wallet with a Trezor hw wallet', () => {
beforeAll(async () => {
driver = await initDriverWithOptions({
browser,
os,
});
afterAll(async () => driver.quit());

it('should be able import a wallet via hw wallet', async () => {
await importHardwareWalletFlow(driver, rootURL, 'trezor');
});

it('should display account 0 name', async () => {
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_1);
const extensionId = await getExtensionIdByName(driver, 'Rainbow');
if (!extensionId) throw new Error('Extension not found');
rootURL += extensionId;
});
afterAll(async () => driver.quit());

it('should be able import a wallet via hw wallet', async () => {
await importHardwareWalletFlow(driver, rootURL, 'trezor');
});

it('should display account 0 name', async () => {
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_1);
});

it('should display hw label on wallet switcher screen', async () => {
await findElementByIdAndClick({
id: 'header-account-name-shuffle',
driver,
});

it('should display hw label on wallet switcher screen', async () => {
await findElementByIdAndClick({
id: 'header-account-name-shuffle',
driver,
});
const hwLabel = await findElementByText(driver, 'Trezor');
expect(hwLabel).toBeTruthy();
});

it('should display account 1 name', async () => {
await findElementByTestIdAndClick({
id: 'wallet-account-2',
driver,
});
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_2);
const hwLabel = await findElementByText(driver, 'Trezor');
expect(hwLabel).toBeTruthy();
});

it('should display account 1 name', async () => {
await findElementByTestIdAndClick({
id: 'wallet-account-2',
driver,
});
},
);
await checkWalletName(driver, rootURL, HARDWARE_WALLETS.WALLET_2);
});
});
Loading
Loading