Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions e2e/distribute-rewards.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test'
import { getDemoStep } from './helpers'

test('distribute rewards', async ({ page }) => {
test.setTimeout(240000)
Expand Down Expand Up @@ -55,23 +56,25 @@ test('distribute rewards', async ({ page }) => {
})

// Step 4: Grant issuer role
const grantEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
const grantStep = getDemoStep(page, 'Grant issuer role on RewardTestUSD.')
const grantEnterDetails = grantStep.getByRole('button', { name: 'Enter details' })
await expect(grantEnterDetails).toBeVisible()
await grantEnterDetails.click()

const grantButton = page.getByRole('button', { name: 'Grant' }).first()
const grantButton = grantStep.getByRole('button', { name: 'Grant' })
await grantButton.click()

await expect(page.getByRole('link', { name: 'View receipt' }).nth(1)).toBeVisible({
timeout: 90000,
})

// Step 5: Mint tokens (after grant completes, Enter details button is the first visible one)
const mintEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
// Step 5: Mint tokens
const mintStep = getDemoStep(page, 'Mint 100 RewardTestUSD to yourself.')
const mintEnterDetails = mintStep.getByRole('button', { name: 'Enter details' })
await expect(mintEnterDetails).toBeVisible()
await mintEnterDetails.click()

const mintButton = page.getByRole('button', { name: 'Mint' }).first()
const mintButton = mintStep.getByRole('button', { name: 'Mint' })
await mintButton.click()

await expect(page.getByRole('link', { name: 'View receipt' }).nth(2)).toBeVisible({
Expand Down
5 changes: 5 additions & 0 deletions e2e/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Locator, Page } from '@playwright/test'

export function getDemoStep(page: Page, title: string | RegExp): Locator {
return page.locator('[data-active][data-completed]').filter({ hasText: title }).first()
}
13 changes: 8 additions & 5 deletions e2e/manage-stablecoin.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test'
import { getDemoStep } from './helpers'

test('manage stablecoin - grant and revoke roles', async ({ page }) => {
test.setTimeout(180000)
Expand Down Expand Up @@ -55,24 +56,26 @@ test('manage stablecoin - grant and revoke roles', async ({ page }) => {
})

// Step 4: Grant issuer role
const grantEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
const grantStep = getDemoStep(page, 'Grant issuer role on ManageTestUSD.')
const grantEnterDetails = grantStep.getByRole('button', { name: 'Enter details' })
await expect(grantEnterDetails).toBeVisible()
await grantEnterDetails.click()

const grantButton = page.getByRole('button', { name: 'Grant' }).first()
const grantButton = grantStep.getByRole('button', { name: 'Grant' })
await expect(grantButton).toBeVisible()
await grantButton.click()

await expect(page.getByRole('link', { name: 'View receipt' }).nth(1)).toBeVisible({
timeout: 90000,
})

// Step 5: Revoke issuer role (now the first visible Enter details)
const revokeEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
// Step 5: Revoke issuer role
const revokeStep = getDemoStep(page, 'Revoke issuer role on ManageTestUSD.')
const revokeEnterDetails = revokeStep.getByRole('button', { name: 'Enter details' })
await expect(revokeEnterDetails).toBeVisible()
await revokeEnterDetails.click()

const revokeButton = page.getByRole('button', { name: 'Revoke' }).first()
const revokeButton = revokeStep.getByRole('button', { name: 'Revoke' })
await expect(revokeButton).toBeVisible()
await revokeButton.click()

Expand Down
13 changes: 8 additions & 5 deletions e2e/mint-stablecoins.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test'
import { getDemoStep } from './helpers'

test('mint stablecoins', async ({ page }) => {
test.setTimeout(180000)
Expand Down Expand Up @@ -56,11 +57,12 @@ test('mint stablecoins', async ({ page }) => {
})

// Step 4: Grant issuer role - click "Enter details" then "Grant"
const grantEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
const grantStep = getDemoStep(page, 'Grant issuer role on MintTestUSD.')
const grantEnterDetails = grantStep.getByRole('button', { name: 'Enter details' })
await expect(grantEnterDetails).toBeVisible()
await grantEnterDetails.click()

const grantButton = page.getByRole('button', { name: 'Grant' }).first()
const grantButton = grantStep.getByRole('button', { name: 'Grant' })
await expect(grantButton).toBeVisible()
await grantButton.click()

Expand All @@ -69,12 +71,13 @@ test('mint stablecoins', async ({ page }) => {
timeout: 90000,
})

// Step 5: Mint tokens - click "Enter details" then "Mint" (now the first visible Enter details)
const mintEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
// Step 5: Mint tokens - click "Enter details" then "Mint"
const mintStep = getDemoStep(page, 'Mint 100 MintTestUSD to yourself.')
const mintEnterDetails = mintStep.getByRole('button', { name: 'Enter details' })
await expect(mintEnterDetails).toBeVisible()
await mintEnterDetails.click()

const mintButton = page.getByRole('button', { name: 'Mint' }).first()
const mintButton = mintStep.getByRole('button', { name: 'Mint' })
await expect(mintButton).toBeVisible()
await mintButton.click()

Expand Down
6 changes: 4 additions & 2 deletions e2e/send-a-payment.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test'
import { getDemoStep } from './helpers'

test('send a payment', async ({ page }) => {
test.setTimeout(120000)
Expand Down Expand Up @@ -39,7 +40,8 @@ test('send a payment', async ({ page }) => {
})

// Step 3: Send payment
const enterDetailsButton = page.getByRole('button', { name: 'Enter details' }).first()
const sendPaymentStep = getDemoStep(page, 'Send 100 AlphaUSD to a recipient.')
const enterDetailsButton = sendPaymentStep.getByRole('button', { name: 'Enter details' })
await expect(enterDetailsButton).toBeVisible()
await enterDetailsButton.click()

Expand All @@ -49,7 +51,7 @@ test('send a payment', async ({ page }) => {
await memoInput.fill('test-memo')

// Click send
const sendButton = page.getByRole('button', { name: 'Send' }).first()
const sendButton = sendPaymentStep.getByRole('button', { name: 'Send' })
await sendButton.click()

// Wait for transaction receipt link
Expand Down
20 changes: 12 additions & 8 deletions e2e/use-for-fees.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test'
import { getDemoStep } from './helpers'

test('use stablecoin for fees', async ({ page }) => {
test.setTimeout(240000)
Expand Down Expand Up @@ -55,23 +56,25 @@ test('use stablecoin for fees', async ({ page }) => {
})

// Step 4: Grant issuer role
const grantEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
const grantStep = getDemoStep(page, 'Grant issuer role on FeeTestUSD.')
const grantEnterDetails = grantStep.getByRole('button', { name: 'Enter details' })
await expect(grantEnterDetails).toBeVisible()
await grantEnterDetails.click()

const grantButton = page.getByRole('button', { name: 'Grant' }).first()
const grantButton = grantStep.getByRole('button', { name: 'Grant' })
await grantButton.click()

await expect(page.getByRole('link', { name: 'View receipt' }).nth(1)).toBeVisible({
timeout: 90000,
})

// Step 5: Mint tokens (after grant completes, Enter details button is the first visible one)
const mintEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
// Step 5: Mint tokens
const mintStep = getDemoStep(page, 'Mint 100 FeeTestUSD to yourself.')
const mintEnterDetails = mintStep.getByRole('button', { name: 'Enter details' })
await expect(mintEnterDetails).toBeVisible()
await mintEnterDetails.click()

const mintButton = page.getByRole('button', { name: 'Mint' }).first()
const mintButton = mintStep.getByRole('button', { name: 'Mint' })
await mintButton.click()

await expect(page.getByRole('link', { name: 'View receipt' }).nth(2)).toBeVisible({
Expand All @@ -87,12 +90,13 @@ test('use stablecoin for fees', async ({ page }) => {
timeout: 90000,
})

// Step 7: Send payment using token as fee (now the only Enter details button visible)
const payEnterDetails = page.getByRole('button', { name: 'Enter details' }).first()
// Step 7: Send payment using token as fee
const payStep = getDemoStep(page, 'Send 100 AlphaUSD and pay fees in FeeTestUSD.')
const payEnterDetails = payStep.getByRole('button', { name: 'Enter details' })
await expect(payEnterDetails).toBeVisible()
await payEnterDetails.click()

const sendButton = page.getByRole('button', { name: 'Send' }).first()
const sendButton = payStep.getByRole('button', { name: 'Send' })
await expect(sendButton).toBeVisible()
await sendButton.click()

Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,19 @@
"posthog-js": "^1.367.0",
"posthog-node": "^5.29.2",
"prool": "^0.2.4",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react-server-dom-webpack": "~19.2.6",
"sonner": "^2.0.7",
"sql-formatter": "^15.7.3",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.2",
"unplugin-auto-import": "^21.0.0",
"unplugin-icons": "^23.0.1",
"viem": "^2.48.8",
"vocs": "https://pkg.pr.new/wevm/vocs@2fb25c2",
"vocs": "2.0.0-rc.0",
"wagmi": "3.6.14",
"waku": "1.0.0-alpha.4",
"waku": "1.0.0-beta.0",
"webauthx": "~0.1.1",
"zod": "^4.3.6"
},
Expand All @@ -59,12 +60,12 @@
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "7.0.0-dev.20260122.3",
"@vitejs/plugin-react": "^5.2.0",
"@vitejs/plugin-react": "^6.0.2",
"anser": "^2.3.5",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"use-sync-external-store": "^1.6.0",
"vite": "^7.3.2",
"vite": "^8.0.14",
"vite-plugin-mkcert": "^1.17.12"
},
"devEngines": {
Expand Down
Loading
Loading