Skip to content

Commit

Permalink
Synpress v4 upgrade - Temporary fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-langa committed Oct 31, 2024
1 parent e904556 commit 4418631
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 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 @@ -32,6 +32,9 @@ test.describe('Aave V3 Multiply - Arbitrum - Wallet connected', async () => {

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({
metamask,
Expand All @@ -52,8 +55,6 @@ test.describe('Aave V3 Multiply - 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 @@ -48,6 +48,9 @@ test.describe('Aave V3 Multiply - 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 4418631

Please sign in to comment.