Skip to content
Open
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
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"preview": "vite preview",
"format": "prettier --write .",
"format:check": "prettier --check .",
"prepare": "husky"
"prepare": "husky",
"test": "playwright test"
},
"dependencies": {
"@ckb-ccc/ccc": "^1.1.25",
Expand Down Expand Up @@ -37,6 +38,7 @@
"devDependencies": {
"@commitlint/cli": "^19.0.0",
"@commitlint/config-conventional": "^19.0.0",
"@playwright/test": "1.61.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.5.0",
Expand Down
17 changes: 17 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
testDir: './tests',
use: {
baseURL: 'http://localhost:5173',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
],
webServer: {
command: 'pnpm dev',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
});
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Header } from '@/components/Header';
import { AutoSign } from '@/components/AutoSign';
import Send from '@/pages/Send';
import Receive from '@/pages/Receive';
import Split from '@/pages/Split';

export function App() {
return (
Expand All @@ -13,6 +14,7 @@ export function App() {
<Routes>
<Route path="/send" element={<Send />} />
<Route path="/receive" element={<Receive />} />
<Route path="/split" element={<Split />} />
<Route path="*" element={<Navigate to="/send" replace />} />
</Routes>
</main>
Expand Down
1 change: 1 addition & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { WalletConnect } from './WalletConnect';
const navLinks = [
{ to: '/send', label: 'Send' },
{ to: '/receive', label: 'Receive' },
{ to: '/split', label: 'Split' },
];

export function Header() {
Expand Down
Loading