Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stage' into BE-632
Browse files Browse the repository at this point in the history
  • Loading branch information
deividaspetraitis committed Dec 16, 2024
2 parents 4a51654 + f248956 commit 9ce6589
Show file tree
Hide file tree
Showing 43 changed files with 906 additions and 790 deletions.
61 changes: 55 additions & 6 deletions .github/workflows/frontend-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
environment_url: ${{ steps.vercel.outputs.environment_url }}
run: echo "$environment_url"

preview-swap-tests:
timeout-minutes: 10
preview-swap-osmo-tests:
timeout-minutes: 15
runs-on: macos-latest
needs: wait-for-deployment
steps:
Expand Down Expand Up @@ -65,13 +65,61 @@ jobs:
WALLET_ID: ${{ secrets.TEST_WALLET_ID }}
run: |
cd packages/e2e
npx playwright test -g "Test Swap feature"
npx playwright test swap.osmo.wallet
- name: upload Swap test results
if: failure()
id: swap-test-results
uses: actions/upload-artifact@v4
with:
name: preview-swap-test-results
name: osmo-swap-test-results
path: packages/e2e/playwright-report

preview-swap-usdc-tests:
timeout-minutes: 15
runs-on: macos-latest
needs: [wait-for-deployment, preview-swap-osmo-tests]
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
sparse-checkout: |
packages/e2e
- name: print environment_url and BRANCH_NAME
env:
BASE_URL: "https://${{ needs.wait-for-deployment.outputs.environment_url }}"
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
echo "$BASE_URL"
echo "$BRANCH_NAME"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache dependencies
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-
- name: Install Playwright
run: |
echo "$GITHUB_OUTPUT"
yarn --cwd packages/e2e install --frozen-lockfile && npx playwright install --with-deps chromium
- name: Run Swap Pair tests
env:
BASE_URL: "https://${{ needs.wait-for-deployment.outputs.environment_url }}"
PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
WALLET_ID: ${{ secrets.TEST_WALLET_ID }}
run: |
cd packages/e2e
npx playwright test swap.usdc.wallet
- name: upload Swap test results
if: failure()
id: swap-test-results
uses: actions/upload-artifact@v4
with:
name: usdc-swap-test-results
path: packages/e2e/playwright-report

preview-portfolio-trx-tests:
Expand Down Expand Up @@ -153,9 +201,10 @@ jobs:
path: packages/e2e/playwright-report

preview-trade-tests:
timeout-minutes: 10
timeout-minutes: 15
runs-on: macos-latest
needs: [wait-for-deployment, preview-swap-tests]
needs:
[wait-for-deployment, preview-swap-osmo-tests, preview-swap-usdc-tests]
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/monitoring-quote-geo-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
run: curl -L "https://ipinfo.io" -s
- name: Check out repository
uses: actions/checkout@v4
with:
sparse-checkout: |
packages/e2e
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/prod-frontend-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ jobs:

prod-e2e-tests:
runs-on: macos-latest
timeout-minutes: 15
timeout-minutes: 20
needs: wait-for-deployment
environment:
name: prod_swap_test
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
sparse-checkout: |
packages/e2e
ref: master
- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -60,7 +62,7 @@ jobs:
WALLET_ID: ${{ secrets.TEST_WALLET_ID }}
run: |
cd packages/e2e
npx playwright test transactions portfolio swap.wallet
npx playwright test transactions portfolio swap.osmo.wallet
- name: upload test results
if: always()
id: e2e-test-results
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ All you need to add is a private keys for wallets that are being used:
To install Playwright, please execute `npx playwright install --with-deps chromium` from the /web folder.

To run a Select pair tests, please execute `npx playwright test -g "Test Select Swap Pair feature"` from the /web folder.
To run a Swap E2E tests, please execute `npx playwright test -g "Test Swap feature"` from the /web folder.
To run a Swap E2E tests, please execute `npx playwright test swap.osmo.wallet` from the /web folder.
To run a Monitoring E2E tests, please execute `npx playwright test monitoring --timeout 180000` from the /web folder.

Tests can be executed locally in a browser by changing `headless: true` to `headless: false`.
Expand Down
Loading

0 comments on commit 9ce6589

Please sign in to comment.