Skip to content

Open source personal finance application

chore(test): add playwright for e2e and mcp

Ilya Komichev6b9e863f6622
diff --git a/.gitignore b/.gitignore
index cb3ec5f9..81de5123 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,16 @@ logs
.DS_Store
.fleet
.idea
+.claude/settings.local.json
+
+# Playwright
+/playwright/profiles
+/playwright/.auth
+/test-results
+/playwright-report
+/blob-report
+/playwright/.cache
+/.playwright-mcp
# Local env files
.env
diff --git a/.mcp.json b/.mcp.json
new file mode 100644
index 00000000..2bad38e2
--- /dev/null
+++ b/.mcp.json
@@ -0,0 +1,16 @@
+{
+ "mcpServers": {
+ "nuxt-ui": {
+ "type": "http",
+ "url": "https://ui.nuxt.com/mcp"
+ },
+ "playwright": {
+ "command": "npx",
+ "args": [
+ "@playwright/mcp@latest",
+ "--config",
+ "./playwright/mcp.config.json"
+ ]
+ }
+ }
+}
diff --git a/package.json b/package.json
index 16aab3bb..1e96ed9c 100644
--- a/package.json
+++ b/package.json
@@ -26,6 +26,11 @@
"typecheck": "nuxi typecheck",
"test": "vitest",
"test:coverage": "vitest run --coverage",
+ "test:e2e": "playwright test",
+ "test:e2e:headed": "playwright test --headed",
+ "test:e2e:ui": "playwright test --ui",
+ "test:e2e:report": "playwright show-report",
+ "test:e2e:install": "playwright install chromium",
"docs:dev": "pnpm --dir docs dev",
"docs:build": "pnpm --dir docs build"
},
@@ -55,6 +60,8 @@
"@nuxt/eslint": "^1.15.2",
"@nuxt/ui": "^4.6.0",
"@nuxtjs/i18n": "^10.2.4",
+ "@playwright/mcp": "^0.0.70",
+ "@playwright/test": "^1.55.0",
"@types/node": "^25.5.0",
"@vite-pwa/nuxt": "^1.1.1",
"@vitest/coverage-v8": "^4.1.1",
diff --git a/playwright.config.ts b/playwright.config.ts
new file mode 100644
index 00000000..a82ad250
--- /dev/null
+++ b/playwright.config.ts
@@ -0,0 +1,19 @@
+import { defineConfig, devices } from '@playwright/test'
+
+export default defineConfig({
+ projects: [
+ {
+ name: 'chromium',
+ use: { ...devices['Desktop Chrome'] },
+ },
+ ],
+ reporter: [['html', { open: 'never' }], ['list']],
+ retries: 0,
+ testDir: './tests/e2e',
+ use: {
+ baseURL: 'http://localhost:3050',
+ screenshot: 'only-on-failure',
+ trace: 'retain-on-failure',
+ video: 'retain-on-failure',
+ },
+})
diff --git a/playwright/mcp.config.json b/playwright/mcp.config.json
new file mode 100644
index 00000000..8de56ca9
--- /dev/null
+++ b/playwright/mcp.config.json
@@ -0,0 +1,13 @@
+{
+ "browser": {
+ "browserName": "chromium",
+ "isolated": false,
+ "userDataDir": "./playwright/profiles/finapp-chromium",
+ "launchOptions": {
+ "headless": false
+ },
+ "contextOptions": {
+ "viewport": null
+ }
+ }
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0fdf4071..ed529b81 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -78,6 +78,12 @@ importers:
'@nuxtjs/i18n':
specifier: ^10.2.4
+ '@playwright/mcp':
+ specifier: ^0.0.70
+ version: 0.0.70
+ '@playwright/test':
+ specifier: ^1.55.0
+ version: 1.59.1
'@types/node':
specifier: ^25.5.0
version: 25.5.0
@@ -2726,6 +2732,16 @@ packages:
resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
+ '@playwright/[email protected]':
+ resolution: {integrity: sha512-Kl0a6l9VL8rvT1oBou3hS5yArjwWV9UlwAkq+0skfK1YVg8XfmmNaAmwZhMeNx/ZhGiWXfCllo6rD/jvZz+WuA==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ '@playwright/[email protected]':
+ resolution: {integrity: sha512-PG6q63nQg5c9rIi4/Z5lR5IVF7yU5MqmKaPOe0HSc0O2cX1fPi96sUQu5j7eo4gKCkB2AnNGoWt7y4/Xx3Kcqg==}
+ engines: {node: '>=18'}
+ hasBin: true
+
resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==}
@@ -5297,6 +5313,11 @@ packages:
resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
+ os: [darwin]
+
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -6596,6 +6617,26 @@ packages:
resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==}
+ resolution: {integrity: sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ resolution: {integrity: sha512-ams3Zo4VXxeOg5ZTTh16GkE8g48Bmxo/9pg9gXl9SVKlVohCU7Jaog7XntY8yFuzENA6dJc1Fz7Z/NNTm9nGEw==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ resolution: {integrity: sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ resolution: {integrity: sha512-Bd5DkzYKG+2g1jLO6NeTXmGLbBYSFffJIOsR4l4hUBkJvzvGGdLZ7jZb2tOtb0WIoWXQKdQj3Ap6WthV4DBS8w==}
+ engines: {node: '>=18'}
+ hasBin: true
+
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
engines: {node: '>=4'}
@@ -10844,6 +10885,15 @@ snapshots:
'@pkgr/[email protected]': {}
+ '@playwright/[email protected]':
+ dependencies:
+ playwright: 1.60.0-alpha-1774999321000
+ playwright-core: 1.60.0-alpha-1774999321000
+
+ '@playwright/[email protected]':
+ dependencies:
+ playwright: 1.59.1
+
'@polka/[email protected]': {}
'@poppinss/[email protected]':
@@ -13524,6 +13574,9 @@ snapshots:
jsonfile: 6.2.0
universalify: 2.0.1
+ optional: true
+
optional: true
@@ -15259,6 +15312,22 @@ snapshots:
exsolve: 1.0.8
pathe: 2.0.3
+
+
+ dependencies:
+ playwright-core: 1.59.1
+ optionalDependencies:
+ fsevents: 2.3.2
+
+ dependencies:
+ playwright-core: 1.60.0-alpha-1774999321000
+ optionalDependencies:
+ fsevents: 2.3.2
+