Skip to content

Commit

Permalink
Merge pull request #598 from OasisDEX/synpress-migration-temporary-fi…
Browse files Browse the repository at this point in the history
…xes-8

Synpress migration temporary fixes 8
  • Loading branch information
juan-langa authored Oct 31, 2024
2 parents 838d3eb + 4418631 commit 8e26fea
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/workflows/z_Reusable_RegressionWithRealWallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
run: |
BASE_URL=${{ inputs.base_url }} \
FLAGS_FEATURES=${{ inputs.flags_features}} \
VERY_OLD_TEST_WALLET_PK=${{ secrets.VERY_OLD_TEST_WALLET_PK }} \
yarn ci:with-real-wallet
- uses: actions/upload-artifact@v4
if: always()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/z_Reusable_RegressionWithWallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
run: |
BASE_URL=${{ inputs.base_url }} \
FLAGS_FEATURES=${{ inputs.flags_features}} \
EMPTY_TEST_WALLET_PK=${{ secrets.EMPTY_TEST_WALLET_PK }} \
yarn ci:synpress-build-cache:test-wallet
- name: Run With wallet ${{ inputs.protocol }}-${{ inputs.network }} tests
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const test = testWithSynpress(metaMaskFixtures(arbitrumSetup));

test.describe.configure({ mode: 'serial' });

test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test.describe('Aave V3 Multiply - Arbitrum - Wallet connected', async () => {
test.beforeEach(async ({ metamask, page }) => {
test.setTimeout(longTestTimeout);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const test = testWithSynpress(metaMaskFixtures(arbitrumSetup));

test.describe.configure({ mode: 'serial' });

test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test.describe('Aave V3 Multiply - Arbitrum - Wallet connected', async () => {
test.beforeEach(async ({ metamask, page }) => {
test.setTimeout(longTestTimeout);

Expand Down
7 changes: 0 additions & 7 deletions tests/withWallet/aaveV3/arbitrum/aaveV3BorrowArbitrum.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ let forkId: string;

const test = testWithSynpress(metaMaskFixtures(arbitrumSetup));

test.describe.configure({ mode: 'serial' });

test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test.beforeEach(async ({ metamask, page }) => {
test.setTimeout(longTestTimeout);
Expand All @@ -30,11 +28,6 @@ test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test('It should open and manage an Aave V3 Borrow Arbitrum ETH/USDC position @regression', async ({
metamask,
}) => {
test.info().annotations.push({
type: 'Test case',
description: '12068',
});

test.setTimeout(extremelyLongTestTimeout);

await app.page.goto('/arbitrum/aave/v3/borrow/eth-usdc#setup');
Expand Down
16 changes: 5 additions & 11 deletions tests/withWallet/aaveV3/arbitrum/aaveV3MultiplyArbitrum1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ let forkId: string;

const test = testWithSynpress(metaMaskFixtures(arbitrumSetup));

test.describe.configure({ mode: 'serial' });

test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test.describe('Aave V3 Multiply - Arbitrum - Wallet connected', async () => {
test.beforeEach(async ({ metamask, page }) => {
test.setTimeout(longTestTimeout);

Expand All @@ -30,14 +28,12 @@ test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test('It should open and manage an Aave V3 Multiply Arbitrum ETH/USDC position @regression', async ({
metamask,
}) => {
test.info().annotations.push({
type: 'Test case',
description: '12068',
});

test.setTimeout(extremelyLongTestTimeout);

await app.page.goto('/arbitrum/aave/v3/multiply/eth-usdc');
await app.page.goto('/arbitrum/aave/v3/multiply/ETH-USDC#setup');

// Pause to avoid random fails
await app.page.waitForTimeout(2_000);

await test.step('It should Open a position', async () => {
await openPosition({
Expand All @@ -59,8 +55,6 @@ test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
});

await test.step('It should Adjust risk - Down', async () => {
await app.position.manage.withdrawCollateral();

await adjustRisk({
metamask,
forkId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const test = testWithSynpress(metaMaskFixtures(arbitrumSetup));

test.describe.configure({ mode: 'serial' });

test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {
test.describe('Aave V3 Multiply - Arbitrum - Wallet connected', async () => {
test.beforeEach(async ({ metamask, page }) => {
test.setTimeout(longTestTimeout);

Expand Down Expand Up @@ -48,6 +48,9 @@ test.describe('Aave V3 Borrow - Arbitrum - Wallet connected', async () => {

await app.page.goto('/arbitrum/aave/v3/multiply/wsteth-dai');

// Pause to avoid random fails
await app.page.waitForTimeout(2_000);

await test.step('It should Open a position', async () => {
await openPosition({
metamask,
Expand Down
5 changes: 5 additions & 0 deletions utils/synpress/test-wallet-setup/arbitrum.setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { defineWalletSetup } from '@synthetixio/synpress';
import { addNetwork, commonMetamaskSetup, PASSWORD } from '../commonWalletSetup';
import 'dotenv/config';

const walletPK = process.env.EMPTY_TEST_WALLET_PK as string;

export default defineWalletSetup(PASSWORD, async (context, walletPage) => {
const metamask = await commonMetamaskSetup({ context, walletPage });

await metamask.importWalletFromPrivateKey(walletPK);

await addNetwork({ metamask, network: 'arbitrum' });
});

0 comments on commit 8e26fea

Please sign in to comment.