From 5e33b5819f6fa374cb9ca9cd6ee64df1cfaf801d Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 6 Sep 2025 14:16:16 +0800 Subject: [PATCH] chore: add claude --- .claude/comands/execute-create-test.md | 39 ++++++++++++++++++++++ .claude/settings.local.json | 46 ++++++++++++++++++++++++++ .gitignore | 1 - 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 .claude/comands/execute-create-test.md create mode 100644 .claude/settings.local.json diff --git a/.claude/comands/execute-create-test.md b/.claude/comands/execute-create-test.md new file mode 100644 index 00000000..a55b1b15 --- /dev/null +++ b/.claude/comands/execute-create-test.md @@ -0,0 +1,39 @@ +# E2E Test Creation Process + +## Overview +Create end-to-end test based on user request: `$ARGUMENTS` + +## Steps + +### 1. Understand Requirements +- Search codebase for context +- Identify dependencies and related tests +- Research additional information if needed + +### 2. Plan +- Create detailed test implementation plan +- Break complex tests into smaller steps +- Use TodoWrite tool to document tasks +- Follow existing test patterns + +### 3. Execute +- Run tasks (with user permission) +- Add `data-testid` attributes where needed +- Ask user for test file location if not specified +- Run test multiple times to ensure stability +- Add logging at each test step for debugging + +## Important Rules +- **Only modify source code to add `data-testid` attributes** +- No other source code changes allowed +- Test multiple times to prevent flaky tests +- Include descriptive logs for each action + +## Test Quality Checklist +- ✓ Test requirements understood +- ✓ Test file location confirmed +- ✓ Required `data-testid` attributes added +- ✓ Logging added for each step +- ✓ Test run multiple times successfully +- ✓ No flaky behavior detected +- ✓ Follows existing patterns \ No newline at end of file diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..e9003f1d --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,46 @@ +{ + "permissions": { + "allow": [ + "Bash(pnpm run:*)", + "Bash(pbjs:*)", + "Bash(npx pbjs:*)", + "Bash(npx pbts:*)", + "Bash(cat:*)", + "Bash(timeout 30s pnpm run dev)", + "Bash(grep:*)", + "Bash(pnpm cypress run:*)", + "Bash(curl:*)", + "Bash(lsof:*)", + "Bash(echo \"CI=$CI\")", + "Bash(echo:*)", + "Bash(docker compose:*)", + "Bash(docker stop:*)", + "Bash(npx tsc:*)", + "WebFetch(domain:www.anthropic.com)", + "Bash(pnpm build:*)", + "Bash(pnpm link:*)", + "Bash(pnpm install:*)", + "Read(/Users/weidongfu/Documents/**)", + "Bash(chmod:*)", + "Bash(./fix_imports.sh)", + "Bash(done)", + "Bash(find:*)", + "Bash(node:*)", + "Bash(pnpm list:*)", + "Bash(jq:*)", + "Bash(npm run build:*)", + "WebFetch(domain:github.com)", + "WebFetch(domain:raw.githubusercontent.com)", + "Bash(sed:*)", + "Bash(pnpm add:*)", + "Bash(timeout 30s pnpm run build)", + "Bash(npm run dev:*)", + "Bash(pnpm eslint:*)" + ], + "deny": [], + "ask": [], + "additionalDirectories": [ + "/Users/weidongfu/Documents/AF/AppFlowy-Cloud-Premium", + ] + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index a63f98cb..0abdc9ad 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,4 @@ coverage .nyc_output cypress/snapshots/**/__diff_output__/ -**/.claude cypress/screenshots