diff --git a/node_modules/.bin/baseline-browser-mapping b/node_modules/.bin/baseline-browser-mapping index 8e9a12d9..7e4dd08b 120000 --- a/node_modules/.bin/baseline-browser-mapping +++ b/node_modules/.bin/baseline-browser-mapping @@ -1 +1,16 @@ -../baseline-browser-mapping/dist/cli.cjs \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@" +else + exec node "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@" +fi diff --git a/node_modules/.bin/browserslist b/node_modules/.bin/browserslist index 3cd991b2..60e71ad8 120000 --- a/node_modules/.bin/browserslist +++ b/node_modules/.bin/browserslist @@ -1 +1,16 @@ -../browserslist/cli.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@" +else + exec node "$basedir/../browserslist/cli.js" "$@" +fi diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild index c83ac070..63bb6d40 120000 --- a/node_modules/.bin/esbuild +++ b/node_modules/.bin/esbuild @@ -1 +1,16 @@ -../esbuild/bin/esbuild \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@" +else + exec node "$basedir/../esbuild/bin/esbuild" "$@" +fi diff --git a/node_modules/.bin/jsesc b/node_modules/.bin/jsesc index 7237604c..879c4133 120000 --- a/node_modules/.bin/jsesc +++ b/node_modules/.bin/jsesc @@ -1 +1,16 @@ -../jsesc/bin/jsesc \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" +else + exec node "$basedir/../jsesc/bin/jsesc" "$@" +fi diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 index 217f3798..abf72a4e 120000 --- a/node_modules/.bin/json5 +++ b/node_modules/.bin/json5 @@ -1 +1,16 @@ -../json5/lib/cli.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" +else + exec node "$basedir/../json5/lib/cli.js" "$@" +fi diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify index ed9009c5..076f91b1 120000 --- a/node_modules/.bin/loose-envify +++ b/node_modules/.bin/loose-envify @@ -1 +1,16 @@ -../loose-envify/cli.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../loose-envify/cli.js" "$@" +else + exec node "$basedir/../loose-envify/cli.js" "$@" +fi diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid index e2be547b..46220bdb 120000 --- a/node_modules/.bin/nanoid +++ b/node_modules/.bin/nanoid @@ -1 +1,16 @@ -../nanoid/bin/nanoid.cjs \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@" +else + exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@" +fi diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser index ce7bf97e..7696ad41 120000 --- a/node_modules/.bin/parser +++ b/node_modules/.bin/parser @@ -1 +1,16 @@ -../@babel/parser/bin/babel-parser.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" +else + exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" +fi diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup index 5939621c..998fc164 120000 --- a/node_modules/.bin/rollup +++ b/node_modules/.bin/rollup @@ -1 +1,16 @@ -../rollup/dist/bin/rollup \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@" +else + exec node "$basedir/../rollup/dist/bin/rollup" "$@" +fi diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver index 5aaadf42..97c53279 120000 --- a/node_modules/.bin/semver +++ b/node_modules/.bin/semver @@ -1 +1,16 @@ -../semver/bin/semver.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" +else + exec node "$basedir/../semver/bin/semver.js" "$@" +fi diff --git a/node_modules/.bin/sha.js b/node_modules/.bin/sha.js index 3c761051..9215bc22 120000 --- a/node_modules/.bin/sha.js +++ b/node_modules/.bin/sha.js @@ -1 +1,16 @@ -../sha.js/bin.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../sha.js/bin.js" "$@" +else + exec node "$basedir/../sha.js/bin.js" "$@" +fi diff --git a/node_modules/.bin/update-browserslist-db b/node_modules/.bin/update-browserslist-db index b11e16f3..cced63c4 120000 --- a/node_modules/.bin/update-browserslist-db +++ b/node_modules/.bin/update-browserslist-db @@ -1 +1,16 @@ -../update-browserslist-db/cli.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../update-browserslist-db/cli.js" "$@" +else + exec node "$basedir/../update-browserslist-db/cli.js" "$@" +fi diff --git a/node_modules/.bin/vite b/node_modules/.bin/vite index 6d1e3bea..014463f9 120000 --- a/node_modules/.bin/vite +++ b/node_modules/.bin/vite @@ -1 +1,16 @@ -../vite/bin/vite.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@" +else + exec node "$basedir/../vite/bin/vite.js" "$@" +fi diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index bede6569..d9ebf075 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -516,10 +516,10 @@ "node": ">=20.19.0" } }, - "node_modules/@esbuild/linux-x64": { + "node_modules/@esbuild/win32-x64": { "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], @@ -527,7 +527,7 @@ "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ], "engines": { "node": ">=12" @@ -780,10 +780,10 @@ "node": ">=14.0.0" } }, - "node_modules/@rolldown/binding-linux-x64-gnu": { + "node_modules/@rolldown/binding-win32-x64-msvc": { "version": "1.0.0-rc.17", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.17.tgz", - "integrity": "sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==", "cpu": [ "x64" ], @@ -791,24 +791,7 @@ "license": "MIT", "optional": true, "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.0-rc.17", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.17.tgz", - "integrity": "sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" + "win32" ], "engines": { "node": "^20.19.0 || >=22.12.0" @@ -821,10 +804,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@rollup/rollup-linux-x64-gnu": { + "node_modules/@rollup/rollup-win32-x64-gnu": { "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", - "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", "cpu": [ "x64" ], @@ -832,13 +815,13 @@ "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, - "node_modules/@rollup/rollup-linux-x64-musl": { + "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", - "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", "cpu": [ "x64" ], @@ -846,7 +829,7 @@ "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, "node_modules/@standard-schema/spec": { @@ -2837,31 +2820,10 @@ "lightningcss-win32-x64-msvc": "1.32.0" } }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { + "node_modules/lightningcss-win32-x64-msvc": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", "cpu": [ "x64" ], @@ -2869,7 +2831,7 @@ "license": "MPL-2.0", "optional": true, "os": [ - "linux" + "win32" ], "engines": { "node": ">= 12.0.0" diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild index 288f7689..971ac096 100755 Binary files a/node_modules/esbuild/bin/esbuild and b/node_modules/esbuild/bin/esbuild differ diff --git a/test-results/.last-run.json b/test-results/.last-run.json new file mode 100644 index 00000000..5fca3f84 --- /dev/null +++ b/test-results/.last-run.json @@ -0,0 +1,4 @@ +{ + "status": "failed", + "failedTests": [] +} \ No newline at end of file diff --git a/tests/connect.spec.js b/tests/connect.spec.js new file mode 100644 index 00000000..753a0c58 --- /dev/null +++ b/tests/connect.spec.js @@ -0,0 +1,24 @@ +import { test, expect } from '@playwright/test'; + +test.describe('Wallet Connection', () => { + test('should show connect button and handle successful connection', async ({ page }) => { + await page.goto('/'); + + const connectBtn = page.getByRole('button', { name: /connect wallet/i }); + await expect(connectBtn).toBeVisible(); + + // Mocking a wallet response if using an extension-based flow + // This is a simplified check for UI state change + await connectBtn.click(); + + // Assuming the app displays the truncated public key upon connection + // e.g., G...ABCD + const accountInfo = page.locator('#account-identity'); + await expect(accountInfo).toContainText(/^G[A-Z0-9]{3}...[A-Z0-9]{4}$/); + }); + + test('should persist connection on page reload', async ({ page }) => { + await page.goto('/'); + // Implementation for session/localstorage check + }); +}); \ No newline at end of file diff --git a/tests/e2e/faucet-contract.spec.js b/tests/e2e/faucet-contract.spec.js new file mode 100644 index 00000000..f4ae19fa --- /dev/null +++ b/tests/e2e/faucet-contract.spec.js @@ -0,0 +1,58 @@ +import { test, expect } from '@playwright/test' +import { Keypair } from '@stellar/stellar-sdk' + +const FRIEND_BOT_URL = 'https://friendbot.stellar.org' + +let fundedPublicKey + +async function connectTestnetAccount(page, publicKey) { + await page.getByRole('button', { name: 'Test' }).click() + await page.getByPlaceholder('G... public key').fill(publicKey) + await page.getByRole('button', { name: /CONNECT/i }).click() + await expect(page.getByText('Overview')).toBeVisible({ timeout: 20000 }) +} + +test.describe('Testnet faucet and contract interaction', () => { + test.beforeAll(async ({ request }) => { + const keypair = Keypair.random() + fundedPublicKey = keypair.publicKey() + + const response = await request.get(`${FRIEND_BOT_URL}?addr=${encodeURIComponent(fundedPublicKey)}`) + expect(response.ok()).toBeTruthy() + }) + + test.beforeEach(async ({ page }) => { + await page.goto('/') + }) + + test('disables faucet navigation on mainnet', async ({ page }) => { + await page.getByRole('button', { name: 'Main' }).click() + const faucetButton = page.getByRole('button', { name: 'Faucet' }) + await expect(faucetButton).toBeDisabled() + }) + + test('funds a testnet account through the faucet', async ({ page }) => { + await connectTestnetAccount(page, fundedPublicKey) + + await page.getByRole('button', { name: 'Faucet' }).click() + await expect(page.getByText('Testnet Faucet')).toBeVisible() + + await page.getByPlaceholder('G... public key to fund').fill(fundedPublicKey) + await page.getByRole('button', { name: /FUND ACCOUNT/i }).click() + + await expect(page.getByText('Account Funded!')).toBeVisible({ timeout: 20000 }) + await expect(page.getByText('✓ 10,000 XLM added to account on testnet')).toBeVisible() + }) + + test('shows contract interaction validation errors for invalid contract id', async ({ page }) => { + await connectTestnetAccount(page, fundedPublicKey) + + await page.getByRole('button', { name: 'Contract Interaction' }).click() + await expect(page.getByText('Contract Interaction')).toBeVisible() + + await page.getByPlaceholder('C... contract address').fill('invalid-contract') + await page.getByRole('button', { name: /Simulate/i }).click() + + await expect(page.getByText('Invalid contract address')).toBeVisible({ timeout: 10000 }) + }) +}) diff --git a/tests/e2e/report/index.html b/tests/e2e/report/index.html new file mode 100644 index 00000000..b2656c6a --- /dev/null +++ b/tests/e2e/report/index.html @@ -0,0 +1,90 @@ + + + + +
+ + + +