You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(claude-md): strengthen testing requirements and add UI test command (#1465)
* docs(claude-md): strengthen testing requirements and add UI test command
* docs(claude-md): gate test rule on testable behavior and soften UI-automation wording
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ngo Quoc Dat <datlechin@gmail.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ These govern every decision — code, architecture, tooling, and process:
12
12
4.**Clean code** — self-explanatory naming, early returns over nested conditionals, small focused functions. No comments in the codebase — code must be self-documenting through clear naming and structure.
13
13
5.**Root cause fixes** — don't patch symptoms. Diagnose the underlying issue, add logging to debug if needed, then fix the actual cause.
14
14
6.**No hacky solutions** — no backward-compatibility shims, no temporary workarounds left in place, no duct tape. If the right fix is harder, do the right fix.
15
-
7.**Testability** — if a feature is testable, write tests. When tests fail, fix the source code — never adjust tests to match incorrect output.
15
+
7.**Testability** — every testable code change needs unit/function tests, and UI/user-flow changes should add UI automation where they run deterministically. When tests fail, fix the source code — never adjust tests to match incorrect output.
16
16
8.**Maintainability** — follow existing patterns but offer refactors when they improve quality. Extract into extensions when approaching size limits. Group by domain logic.
17
17
9.**Scalability** — design for the plugin system's open-ended nature. `DatabaseType` is a struct, not an enum. All switches need `default:`.
18
18
@@ -52,6 +52,7 @@ swiftformat . # Format code
52
52
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation
53
53
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation -only-testing:TableProTests/TestClassName
54
54
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation -only-testing:TableProTests/TestClassName/testMethodName
55
+
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation -only-testing:TableProUITests
55
56
56
57
# DMG
57
58
scripts/create-dmg.sh
@@ -230,7 +231,7 @@ These are **non-negotiable** — never skip them:
4. **Tests**: Write tests for testable features. When tests fail, fix the source code — never adjust tests to match incorrect output. Tests define expected behavior.
234
+
4. **Tests**: Every change with testable behavior must include or update unit/function tests. UI and user-flow changes should add or update `TableProUITests` UI automation where the flow runs deterministically; if it can't, note why in the PR description. When tests fail, fix the source code — never adjust tests to match incorrect output. Tests define expected behavior.
234
235
235
236
5. **Lint after changes**: Run `swiftlint lint --strict` to verify compliance.
0 commit comments