From 9b54537d9e245fa71f9921b42b20cd6b28e0ccef Mon Sep 17 00:00:00 2001 From: Nicola Zangrandi Date: Fri, 21 Feb 2025 10:07:04 +0100 Subject: [PATCH] feat(rules): add manual testing requirements --- .cursor/rules/manual-testing.mdc | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .cursor/rules/manual-testing.mdc diff --git a/.cursor/rules/manual-testing.mdc b/.cursor/rules/manual-testing.mdc new file mode 100644 index 0000000..7c9603e --- /dev/null +++ b/.cursor/rules/manual-testing.mdc @@ -0,0 +1,90 @@ +--- +description: Ensure manual testing of key functionality before committing changes +globs: **/*.{ts,js,go,svelte} +--- + +When making changes that affect functionality: + +1. Build and Run Requirements: + - Run `./build.sh` to ensure everything builds + - Start the application with `./notes-app` + - Wait for server to be ready at http://localhost:3000 + +2. Core Functionality Testing: + - Test all features directly affected by changes + - For note-related changes: + - Create a new note + - Edit an existing note + - Check note links work (if link-related changes) + - Verify note deletion + - For UI changes: + - Check responsive behavior + - Verify all interactive elements work + - Test navigation flows + +3. Cross-Feature Testing: + - Test features that interact with changed components + - Verify no regressions in related functionality + - Check both success and error paths + +4. Browser Testing: + - Test in primary development browser + - Verify critical paths in secondary browser + - Check console for errors + +5. Error Cases: + - Test invalid inputs + - Verify error messages are clear + - Check error handling behavior + +6. Cleanup: + - Stop running services + - Clean up test data if necessary + - Reset to known good state + +7. Documentation: + - Add testing steps to commit message body + - Note any special test cases or considerations + - Document any known limitations + +metadata: + priority: high + version: 1.0 + + +examples: + - input: | + # Bad: Direct commit after code changes + git add . && git commit -m "feat: add note linking" + output: | + # Good: Manual testing before commit + ./build.sh + ./notes-app + # Manual testing steps... + # 1. Create note "Test Note" + # 2. Create note "Linked Note" + # 3. Add link [[Linked Note]] to "Test Note" + # 4. Verify link works + git add . && git commit -m "feat: add note linking + + Testing completed: + - Created and linked notes successfully + - Verified bidirectional navigation + - Tested invalid link handling" + + - input: | + # Bad: Commit UI changes without testing + git commit -m "fix: update note editor styling" + output: | + # Good: Test UI changes across scenarios + ./build.sh + ./notes-app + # 1. Test editor with short/long content + # 2. Verify mobile responsiveness + # 3. Check different browsers + git commit -m "fix: update note editor styling + + Tested: + - Responsive behavior on desktop/mobile + - Long content handling + - Chrome and Firefox compatibility" \ No newline at end of file