Skip to content

Commit 0d85ffb

Browse files
Merge pull request #420 from multiversx/development
Development
2 parents 080aa1d + 7878fe5 commit 0d85ffb

File tree

123 files changed

+2390
-977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2390
-977
lines changed

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
],
3838
"plugins": ["react-hooks", "prettier", "import", "sort-exports"],
3939
"rules": {
40-
"sort-exports/sort-exports": "error",
4140
"sort-imports": [
4241
"error",
4342
{

.github/workflows/run-merge-e2e-tests.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,8 @@ on:
44
branches: [main]
55
workflow_dispatch:
66
jobs:
7-
Slack-Notification:
8-
runs-on: runner-dapp
9-
steps:
10-
- name: Slack Notification
11-
uses: rtCamp/action-slack-notify@master
12-
env:
13-
if: always()
14-
SLACK_ICON_EMOJI: ':robot_face:'
15-
SLACK_USERNAME: Playwright Bot
16-
SLACK_MESSAGE: E2E merge tests are now running. A new notification will be sent when completed.
17-
SLACK_TITLE : 'Playwright E2E Template RUN'
18-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
197
E2E-RUN:
208
runs-on: runner-dapp
21-
needs: Slack-Notification
229
env:
2310
KEYSTORE1_JSON_B64: ${{ secrets.KEYSTORE1_JSON_B64 }}
2411
KEYSTORE1_PASSWORD: ${{ secrets.KEYSTORE1_PASSWORD }}
@@ -41,6 +28,10 @@ jobs:
4128

4229
KEYSTORE6_PRIVATE_KEY_UTF8: ${{ secrets.KEYSTORE6_PRIVATE_KEY_UTF8 }}
4330
KEYSTORE6_ADDRESS: ${{ secrets.KEYSTORE6_ADDRESS }}
31+
32+
METAMASK_MNEMONIC: ${{ secrets.METAMASK_MNEMONIC }}
33+
METAMASK_ADDRESS: ${{ secrets.METAMASK_ADDRESS }}
34+
METAMASK_PASSWORD: ${{ secrets.METAMASK_PASSWORD }}
4435
steps:
4536
- name: Checkout
4637
uses: actions/checkout@v4
@@ -60,7 +51,7 @@ jobs:
6051
- name: Install Playwright Browsers
6152
run: pnpm exec playwright install --with-deps
6253
- name: Run Playwright E2E Tests
63-
run: pnpm run run-playwright-test
54+
run: xvfb-run pnpm run run-playwright-test
6455
- name: Upload Playwright test report
6556
uses: actions/upload-artifact@v4
6657
if: ${{ !cancelled() }}
@@ -72,18 +63,18 @@ jobs:
7263
uses: rtCamp/action-slack-notify@master
7364
if: success()
7465
env:
75-
SLACK_ICON_EMOJI: ':white_check_mark:'
66+
SLACK_ICON_EMOJI: ':robot_face:'
7667
SLACK_USERNAME: Playwright Bot
77-
SLACK_MESSAGE: 'E2E merge Tests completed successfully! All tests passed. 📊 Test Report: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
68+
SLACK_MESSAGE: 'E2E merge Tests completed successfully!'
7869
SLACK_TITLE: 'Playwright E2E Tests - SUCCESS'
7970
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
8071
- name: Slack Failure Notification
8172
uses: rtCamp/action-slack-notify@master
8273
if: failure()
8374
env:
84-
SLACK_ICON_EMOJI: ':red_circle:'
75+
SLACK_ICON_EMOJI: ':robot_face:'
8576
SLACK_USERNAME: Playwright Bot
86-
SLACK_MESSAGE: 'E2E merge Tests failed. Please check the logs for details. 📊 Test Report: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
77+
SLACK_MESSAGE: 'E2E merge Tests failed!'
8778
SLACK_TITLE: 'Playwright E2E Tests - FAILED'
8879
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
8980

.github/workflows/run-night-e2e-tests.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,8 @@ on:
44
- cron: '0 20 * * *'
55
workflow_dispatch:
66
jobs:
7-
Slack-Notification:
8-
runs-on: runner-dapp
9-
steps:
10-
- name: Slack Notification
11-
uses: rtCamp/action-slack-notify@master
12-
env:
13-
if: always()
14-
SLACK_ICON_EMOJI: ':robot_face:'
15-
SLACK_USERNAME: Playwright Bot
16-
SLACK_MESSAGE: E2E night tests are now running. A new notification will be sent when completed.
17-
SLACK_TITLE : 'Playwright E2E Template RUN'
18-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
197
E2E-RUN:
208
runs-on: runner-dapp
21-
needs: Slack-Notification
229
env:
2310
KEYSTORE1_JSON_B64: ${{ secrets.KEYSTORE1_JSON_B64 }}
2411
KEYSTORE1_PASSWORD: ${{ secrets.KEYSTORE1_PASSWORD }}
@@ -41,6 +28,10 @@ jobs:
4128

4229
KEYSTORE6_PRIVATE_KEY_UTF8: ${{ secrets.KEYSTORE6_PRIVATE_KEY_UTF8 }}
4330
KEYSTORE6_ADDRESS: ${{ secrets.KEYSTORE6_ADDRESS }}
31+
32+
METAMASK_MNEMONIC: ${{ secrets.METAMASK_MNEMONIC }}
33+
METAMASK_ADDRESS: ${{ secrets.METAMASK_ADDRESS }}
34+
METAMASK_PASSWORD: ${{ secrets.METAMASK_PASSWORD }}
4435
steps:
4536
- name: Checkout
4637
uses: actions/checkout@v4
@@ -60,7 +51,8 @@ jobs:
6051
- name: Install Playwright Browsers
6152
run: pnpm exec playwright install --with-deps
6253
- name: Run Playwright E2E Tests
63-
run: pnpm run run-playwright-test
54+
working-directory: tests
55+
run: xvfb-run pnpm run run-playwright-test
6456
- name: Upload Playwright test report
6557
uses: actions/upload-artifact@v4
6658
if: ${{ !cancelled() }}
@@ -72,17 +64,17 @@ jobs:
7264
uses: rtCamp/action-slack-notify@master
7365
if: success()
7466
env:
75-
SLACK_ICON_EMOJI: ':white_check_mark:'
67+
SLACK_ICON_EMOJI: ':robot_face:'
7668
SLACK_USERNAME: Playwright Bot
77-
SLACK_MESSAGE: 'E2E Night Tests completed successfully! All tests passed. 📊 Test Report: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
69+
SLACK_MESSAGE: 'E2E Night Tests completed successfully!'
7870
SLACK_TITLE: 'Playwright E2E Tests - SUCCESS'
7971
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
8072
- name: Slack Failure Notification
8173
uses: rtCamp/action-slack-notify@master
8274
if: failure()
8375
env:
84-
SLACK_ICON_EMOJI: ':x:'
76+
SLACK_ICON_EMOJI: ':robot_face:'
8577
SLACK_USERNAME: Playwright Bot
86-
SLACK_MESSAGE: 'E2E Night Tests failed. Please check the logs for details. 📊 Test Report: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
78+
SLACK_MESSAGE: 'E2E Night Tests failed!'
8779
SLACK_TITLE: 'Playwright E2E Tests - FAILED'
8880
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ node_modules/
3737
/playwright/.cache/
3838
/certificates/
3939
/temps/
40-
40+
.cache
41+
4142
# secrets (local only)
4243
tests/support/wallets/

jest.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ module.exports = {
1515
},
1616
transformIgnorePatterns: ['node_modules/(^.+\\\\.(ts|js)$)'],
1717
testMatch: ['**/src/**/?(*.)+(spec|test|bgTest).ts?(x)'],
18-
moduleNameMapper: {
19-
'\\.(css|sass|scss)$': 'identity-obj-proxy'
20-
},
18+
2119
moduleFileExtensions: [
2220
// Place tsx and ts to beginning as suggestion from Jest team
2321
// https://jestjs.io/docs/configuration#modulefileextensions-arraystring
2422
'tsx',
2523
'ts',
2624
'web.js',
2725
'js',
26+
'jsx',
27+
'cjs',
28+
'mjs',
2829
'web.ts',
2930
'web.tsx',
3031
'json',

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"axios": "1.10.0",
1919
"bignumber.js": "^9.x",
2020
"classnames": "2.3.2",
21-
"moment": "2.29.4",
21+
"luxon": "3.5.0",
2222
"motion": "^12.23.12",
2323
"protobufjs": "^7.5.3",
2424
"react": "18.2.0",
@@ -40,8 +40,7 @@
4040
"copy-mainnet-config": "cp ./src/config/config.mainnet.ts ./src/config/index.ts",
4141
"test": "jest",
4242
"run-playwright-test": "playwright test",
43-
"run-playwright-test-ui": "playwright test --ui",
44-
"run-playwright-test-grep": "playwright test --grep \"$npm_config_grep\""
43+
"run-playwright-test-ui": "playwright test --ui"
4544
},
4645
"browserslist": [
4746
">0.2%",
@@ -58,7 +57,9 @@
5857
"@testing-library/jest-dom": "6.1.3",
5958
"@testing-library/react": "14.0.0",
6059
"@testing-library/user-event": "14.5.1",
60+
"@types/fs-extra": "11.0.4",
6161
"@types/jest": "29.5.5",
62+
"@types/luxon": "3.4.2",
6263
"@types/node": "20.7.1",
6364
"@types/react": "18.2.23",
6465
"@types/react-dom": "^19.1.7",

playwright.config.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { TEST_CONFIG } from './tests/config';
1010
* See https://playwright.dev/docs/test-configuration.
1111
*/
1212
export default defineConfig({
13-
globalSetup: './tests/support/globalSetup.ts',
13+
globalSetup: './tests/support/template/globalSetup.ts',
1414
/* timeout for each test */
1515
timeout: TEST_CONFIG.timeout,
1616
/* timeout for locators */
@@ -54,14 +54,22 @@ export default defineConfig({
5454
use: {
5555
...devices['Desktop Chrome'],
5656
launchOptions: {
57-
args: ['--start-maximized']
57+
args: [
58+
'--start-maximized',
59+
'--disable-web-security',
60+
'--disable-features=VizDisplayCompositor'
61+
]
5862
}
5963
}
6064
}
6165
],
6266
webServer: {
6367
command: 'pnpm run start-devnet',
68+
url: 'https://localhost:3000',
6469
timeout: 120 * 1000,
65-
reuseExistingServer: !process.env.CI
70+
reuseExistingServer: !process.env.CI,
71+
stdout: 'pipe',
72+
stderr: 'pipe',
73+
ignoreHTTPSErrors: true
6674
}
6775
});

0 commit comments

Comments
 (0)