Skip to content

Commit

Permalink
Release/5.0.9 (#2609)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Smith <[email protected]>
Co-authored-by: Felipe Mendes <[email protected]>
Co-authored-by: tomiir <[email protected]>
Co-authored-by: Segun Adebayo <[email protected]>
Co-authored-by: Enes <[email protected]>
Co-authored-by: Gancho Radkov <[email protected]>
Co-authored-by: Chris Smith <[email protected]>
Co-authored-by: Valentyn <[email protected]>
Co-authored-by: Karandeep Singh <[email protected]>
  • Loading branch information
10 people authored Jul 29, 2024
1 parent 4f7087e commit efa0963
Show file tree
Hide file tree
Showing 115 changed files with 1,994 additions and 1,929 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/ui_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
type: boolean
secure-site-url:
description: 'Secure site SDK url'
default: 'https://secure.walletconnect.com/sdk'
default: 'https://secure.walletconnect.org/sdk'
required: false
type: string
secrets:
Expand All @@ -50,8 +50,16 @@ jobs:
name: 'Playwright Tests'
runs-on:
group: ubuntu-runners
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
shardTotal: [4]
timeout-minutes: 20
steps:
- name: Tune GitHub-hosted runner network
uses: smorimoto/tune-github-hosted-runner-network@v1

- name: checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -83,7 +91,7 @@ jobs:
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-${{ hashFiles('apps/laboratory/tests/shared/constants/devices.ts') }}

- name: install
- name: Install dependencies
run: pnpm install

- name: build packages and lab
Expand Down Expand Up @@ -114,25 +122,21 @@ jobs:
SOCIAL_TEST_PASSWORD: ${{ secrets.TESTS_SOCIAL_PASSWORD }}
CI: true
working-directory: ./apps/laboratory/
run: pnpm ${{ inputs.command }}
run: pnpm ${{ inputs.command }} --shard=${{ matrix.shard }}/${{ matrix.shardTotal }}

- name: Run canary with minimal environment config
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
NEXTAUTH_SECRET: ${{ secrets.TESTS_NEXTAUTH_SECRET }}
MAILSAC_API_KEY: ${{ secrets.TESTS_MAILSEC_API_KEY }}
NEXT_PUBLIC_SECURE_SITE_SDK_URL: ${{ inputs.secure-site-url }}
CI: true
working-directory: ./apps/laboratory/
run: pnpm playwright:test:canary

- uses: actions/upload-artifact@v3
if: always()
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
name: playwright-report-${{ matrix.shard }}
path: ./apps/laboratory/playwright-report/
retention-days: 7

- uses: actions/upload-artifact@v3
if: always()
with:
name: screenshots
path: ./apps/laboratory/test-results/
retention-days: 7
9 changes: 9 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @apps/demo

## 5.0.9

### Patch Changes

- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588
- hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603

**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9

## 5.0.8

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/demo",
"version": "5.0.8",
"version": "5.0.9",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -25,6 +25,7 @@
"zustand": "4.5.2"
},
"devDependencies": {
"@types/node": "20.11.5",
"@types/react": "18.2.62",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.18",
Expand Down
9 changes: 9 additions & 0 deletions apps/gallery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @apps/gallery

## 5.0.9

### Patch Changes

- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588
- hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603

**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9

## 5.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/gallery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/gallery",
"version": "5.0.8",
"version": "5.0.9",
"private": true,
"main": "index.js",
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions apps/laboratory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @apps/laboratory

## 5.0.9

### Patch Changes

- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588 - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603

**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9

## 5.0.8

### Patch Changes
Expand Down
30 changes: 15 additions & 15 deletions apps/laboratory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apps/laboratory",
"version": "5.0.8",
"version": "5.0.9",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -11,7 +11,7 @@
"playwright:install": "playwright install --with-deps",
"playwright:test": "playwright test",
"playwright:test:basic": "playwright test --grep 'basic-tests.spec.ts'",
"playwright:test:wallet": "playwright test --grep 'connect-qr.spec.ts|wallet.spec.ts'",
"playwright:test:wallet": "playwright test --grep 'wallet.spec.ts'",
"playwright:test:email": "playwright test --grep 'email.spec.ts'",
"playwright:test:social": "playwright test --grep 'social.spec.ts'",
"playwright:test:siwe": "playwright test --grep siwe.spec.ts",
Expand All @@ -20,17 +20,17 @@
"playwright:test:sa": "playwright test --grep smart-account.spec.ts",
"playwright:test:canary": "playwright test --retries=0 --grep canary.spec.ts --project='Desktop Chrome/wagmi'",
"playwright:test:wallet-features": "playwright test --grep wallet-features.spec.ts",
"playwright:debug": "pnpm playwright:test -- --debug",
"playwright:debug:basic": "pnpm playwright:test:basic -- --debug",
"playwright:debug:wallet": "pnpm playwright:test:wallet -- --debug",
"playwright:debug:email": "pnpm playwright:test:email -- --debug",
"playwright:debug:social": "pnpm playwright:test:social -- --debug",
"playwright:debug:siwe": "pnpm playwright:test:siwe -- --debug",
"playwright:debug:siwe-email": "pnpm playwright:test:siwe-email -- --debug",
"playwright:debug:siwe-sa": "pnpm playwright:test:siwe-sa -- --debug",
"playwright:debug:sa": "pnpm playwright:test:sa -- --debug",
"playwright:debug:canary": "pnpm playwright:test:canary -- --debug",
"playwright:debug:wallet-features": "pnpm playwright:test:wallet-features -- --debug"
"playwright:debug": "pnpm playwright:test --debug",
"playwright:debug:basic": "pnpm playwright:test:basic --debug",
"playwright:debug:wallet": "pnpm playwright:test:wallet --debug",
"playwright:debug:email": "pnpm playwright:test:email --debug",
"playwright:debug:social": "pnpm playwright:test:social --debug",
"playwright:debug:siwe": "pnpm playwright:test:siwe --debug",
"playwright:debug:siwe-email": "pnpm playwright:test:siwe-email --debug",
"playwright:debug:siwe-sa": "pnpm playwright:test:siwe-sa --debug",
"playwright:debug:sa": "pnpm playwright:test:sa --debug",
"playwright:debug:canary": "pnpm playwright:test:canary --debug",
"playwright:debug:wallet-features": "pnpm playwright:test:wallet-features --debug"
},
"dependencies": {
"@chakra-ui/icons": "2.1.1",
Expand All @@ -39,12 +39,11 @@
"@emotion/styled": "11.11.0",
"@sentry/browser": "7.92.0",
"@sentry/react": "7.92.0",
"@solana/wallet-adapter-backpack": "0.1.14",
"@solana/wallet-adapter-wallets": "0.19.32",
"@solana/web3.js": "1.91.7",
"@tanstack/react-query": "5.24.8",
"@wagmi/core": "2.11.6",
"@wagmi/connectors": "5.0.21",
"@wagmi/core": "2.11.6",
"@walletconnect/ethereum-provider": "2.14.0",
"@walletconnect/utils": "2.14.0",
"@web3modal/ethers": "workspace:*",
Expand All @@ -69,6 +68,7 @@
"@aws-sdk/client-cloudwatch": "3.509.0",
"@mailsac/api": "1.0.5",
"@playwright/test": "1.40.1",
"@types/node": "20.11.5",
"@types/react": "18.2.62",
"@types/react-dom": "18.2.7",
"dotenv": "16.3.1"
Expand Down
4 changes: 3 additions & 1 deletion apps/laboratory/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ export default defineConfig<ModalFixture>({
retries: getValue(2, 1),
workers: getValue(8, 4),
reporter: getValue(
[['list'], ['html', { open: 'never' }]],
[['list'], ['html', { host: '0.0.0.0' }]],
[['list'], ['html', { host: '0.0.0.0' }]]
),
// Limits the number of failed tests in the whole test suite. Playwright Test will stop after reaching this number of failed tests and skip any tests that were not executed yet
maxFailures: getValue(10, undefined),
expect: {
timeout: getValue(60, 15) * 1000
},
Expand Down
10 changes: 5 additions & 5 deletions apps/laboratory/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export default function HomePage() {
<Stack direction="row" justifyContent="space-between" alignItems="center">
<Box>
<Heading size="xs" textTransform="uppercase">
External Demo
Demo
</Heading>
<Text pt="2" fontSize="sm">
Configuration with all features enabled and randomly using ethers or wagmi
All features enabled and randomly using ethers or wagmi
</Text>
</Box>
<RandomLink hrefs={['/library/wagmi-all', '/library/ethers-all']}>
Expand All @@ -47,11 +47,11 @@ export default function HomePage() {
<Stack direction="row" justifyContent="space-between" alignItems="center">
<Box>
<Heading size="xs" textTransform="uppercase">
Internal Testing
Demo w/ Sample Wallets
</Heading>
<Text pt="2" fontSize="sm">
Configuration with all features and custom wallets enabled and randomly using
ethers or wagmi
All features enabled, with sample wallet links, and randomly using ethers or
wagmi
</Text>
</Box>
<RandomLink hrefs={['/library/wagmi-all-internal', '/library/ethers-all-internal']}>
Expand Down
6 changes: 3 additions & 3 deletions apps/laboratory/src/pages/library/solana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { solana, solanaDevnet, solanaTestnet } from '../../utils/ChainsUtil'
import { Web3ModalButtons } from '../../components/Web3ModalButtons'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { SolanaTests } from '../../components/Solana/SolanaTests'
import { BackpackWalletAdapter } from '@solana/wallet-adapter-backpack'
import { HuobiWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets'
import { SolflareWalletAdapter } from '@solana/wallet-adapter-wallets'

const chains = [solana, solanaTestnet, solanaDevnet]

Expand All @@ -25,7 +24,8 @@ const modal = createWeb3Modal({
termsConditionsUrl: 'https://walletconnect.com/terms',
privacyPolicyUrl: 'https://walletconnect.com/privacy',
customWallets: ConstantsUtil.CustomWallets,
wallets: [new BackpackWalletAdapter(), new HuobiWalletAdapter(), new SolflareWalletAdapter()]
enableSwaps: false,
wallets: [new SolflareWalletAdapter()]
})

ThemeStore.setModal(modal)
Expand Down
4 changes: 3 additions & 1 deletion apps/laboratory/tests/basic-tests.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { testMExternal } from './shared/fixtures/w3m-external-fixture'
import { testM, expect } from './shared/fixtures/w3m-fixture'
import { ModalValidator } from './shared/validators/ModalValidator'

testM.describe('Modal only tests', () => {
testM('Should be able to open modal', async ({ modalPage }) => {
Expand All @@ -9,7 +10,8 @@ testM.describe('Modal only tests', () => {
})

testMExternal.describe('External connectors tests', () => {
testMExternal('Should show external connectors', async ({ modalPage, modalValidator }) => {
testMExternal('Should show external connectors', async ({ modalPage }) => {
const modalValidator = new ModalValidator(modalPage.page)
await modalPage.page.getByTestId('connect-button').click()
await modalValidator.expectExternalVisible()
})
Expand Down
93 changes: 48 additions & 45 deletions apps/laboratory/tests/canary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import { testConnectedMW } from './shared/fixtures/w3m-wallet-fixture'
import { timeEnd, timeStart } from './shared/utils/logs'
import { uploadCanaryResultsToCloudWatch } from './shared/utils/metrics'
import { expectConnection } from './shared/utils/validation'
import { ModalValidator } from './shared/validators/ModalValidator'
import { WalletValidator } from './shared/validators/WalletValidator'

const ENV = process.env['ENVIRONMENT'] || 'dev'
const REGION = process.env['REGION'] || 'eu-central-1'

testConnectedMW.beforeEach(async ({ modalValidator, walletValidator }) => {
testConnectedMW.beforeEach(async ({ modalPage, walletPage }) => {
const modalValidator = new ModalValidator(modalPage.page)
const walletValidator = new WalletValidator(walletPage.page)
timeStart('beforeEach expectConnection')
await expectConnection(modalValidator, walletValidator)
timeEnd('beforeEach expectConnection')
Expand All @@ -35,47 +39,46 @@ testConnectedMW.afterEach(async ({ browserName, timingRecords }, testInfo) => {
}
})

testConnectedMW(
'it should sign',
async ({ modalPage, walletPage, modalValidator, walletValidator, timingRecords }) => {
timeStart('modalPage.sign()')
await modalPage.sign()
timeEnd('modalPage.sign()')
const signRequestedTime = new Date()
timeStart('walletValidator.expectReceivedSign')
await walletValidator.expectReceivedSign({})
timeEnd('walletValidator.expectReceivedSign')
const signReceivedTime = new Date()
timingRecords.push({
item: 'sign',
timeMs: signReceivedTime.getTime() - signRequestedTime.getTime()
})
timeStart('walletPage.handleRequest')
await walletPage.handleRequest({ accept: true })
timeEnd('walletPage.handleRequest')
timeStart('modalValidator.expectAcceptedSign')
await modalValidator.expectAcceptedSign()
timeEnd('modalValidator.expectAcceptedSign')
timeStart('modalPage.disconnect')
await modalPage.disconnect()
timeEnd('modalPage.disconnect')
const disconnectRequestedTime = new Date()
timeStart('walletValidator.expectDisconnected')
await walletValidator.expectDisconnected()
timeEnd('walletValidator.expectDisconnected')
// The wallet completes the disconnect first, so testing the disconnect time of the wallet before the disconnect time of the app
const disconnectWalletReceivedTime = new Date()
timingRecords.push({
item: 'disconnectWallet',
timeMs: disconnectWalletReceivedTime.getTime() - disconnectRequestedTime.getTime()
})
timeStart('modalValidator.expectDisconnected')
await modalValidator.expectDisconnected()
timeEnd('modalValidator.expectDisconnected')
const disconnectAppReceivedTime = new Date()
timingRecords.push({
item: 'disconnectApp',
timeMs: disconnectAppReceivedTime.getTime() - disconnectRequestedTime.getTime()
})
}
)
testConnectedMW('it should sign', async ({ modalPage, walletPage, timingRecords }) => {
const modalValidator = new ModalValidator(modalPage.page)
const walletValidator = new WalletValidator(walletPage.page)
timeStart('modalPage.sign()')
await modalPage.sign()
timeEnd('modalPage.sign()')
const signRequestedTime = new Date()
timeStart('walletValidator.expectReceivedSign')
await walletValidator.expectReceivedSign({})
timeEnd('walletValidator.expectReceivedSign')
const signReceivedTime = new Date()
timingRecords.push({
item: 'sign',
timeMs: signReceivedTime.getTime() - signRequestedTime.getTime()
})
timeStart('walletPage.handleRequest')
await walletPage.handleRequest({ accept: true })
timeEnd('walletPage.handleRequest')
timeStart('modalValidator.expectAcceptedSign')
await modalValidator.expectAcceptedSign()
timeEnd('modalValidator.expectAcceptedSign')
timeStart('modalPage.disconnect')
await modalPage.disconnect()
timeEnd('modalPage.disconnect')
const disconnectRequestedTime = new Date()
timeStart('walletValidator.expectDisconnected')
await walletValidator.expectDisconnected()
timeEnd('walletValidator.expectDisconnected')
// The wallet completes the disconnect first, so testing the disconnect time of the wallet before the disconnect time of the app
const disconnectWalletReceivedTime = new Date()
timingRecords.push({
item: 'disconnectWallet',
timeMs: disconnectWalletReceivedTime.getTime() - disconnectRequestedTime.getTime()
})
timeStart('modalValidator.expectDisconnected')
await modalValidator.expectDisconnected()
timeEnd('modalValidator.expectDisconnected')
const disconnectAppReceivedTime = new Date()
timingRecords.push({
item: 'disconnectApp',
timeMs: disconnectAppReceivedTime.getTime() - disconnectRequestedTime.getTime()
})
})
Loading

0 comments on commit efa0963

Please sign in to comment.