|
| 1 | +# Testing & Verification Guide |
| 2 | + |
| 3 | +## Extension Verification Checklist |
| 4 | + |
| 5 | +### Installation Verification |
| 6 | +- [ ] Extension loads without errors in Chrome |
| 7 | +- [ ] Extension icon appears in Chrome toolbar |
| 8 | +- [ ] No errors in Chrome DevTools console |
| 9 | +- [ ] Extension shows as active in `chrome://extensions/` |
| 10 | + |
| 11 | +### Feature 1: Copy PR Link Button |
| 12 | +**Test Scenarios:** |
| 13 | + |
| 14 | +1. **Regular PR (Open)** |
| 15 | + - Navigate to: Any open GitHub pull request |
| 16 | + - Expected: "Copy PR Link" button appears next to PR title |
| 17 | + - Action: Click the button |
| 18 | + - Expected: |
| 19 | + - Text copied to clipboard in format: `{PR Title}: {PR URL}` |
| 20 | + - Button shows "Copied!" with green checkmark |
| 21 | + - Button returns to normal state after 2 seconds |
| 22 | + |
| 23 | +2. **Draft PR** |
| 24 | + - Navigate to: Any draft GitHub pull request |
| 25 | + - Expected: Same behavior as regular PR for Feature 1 |
| 26 | + |
| 27 | +3. **Closed/Merged PR** |
| 28 | + - Navigate to: A closed or merged pull request |
| 29 | + - Expected: Same behavior - button should still work |
| 30 | + |
| 31 | +### Feature 2: Request Copilot Review Button |
| 32 | +**Test Scenarios:** |
| 33 | + |
| 34 | +1. **Draft PR with Copilot Available** |
| 35 | + - Navigate to: A draft pull request where Copilot is available |
| 36 | + - Expected: "Request Review" button appears next to Copilot reviewer link |
| 37 | + - Action: Click the button |
| 38 | + - Expected: |
| 39 | + - Attempts to open reviewer selection UI |
| 40 | + - Button shows "Requested!" with green checkmark |
| 41 | + - Button returns to normal state after 2 seconds |
| 42 | + |
| 43 | +2. **Non-Draft PR** |
| 44 | + - Navigate to: An open (non-draft) pull request |
| 45 | + - Expected: "Request Review" button does NOT appear |
| 46 | + - Reason: Feature only activates on draft PRs |
| 47 | + |
| 48 | +3. **Draft PR without Copilot** |
| 49 | + - Navigate to: A draft PR where Copilot is not listed as a reviewer option |
| 50 | + - Expected: Button does not appear (no Copilot link to attach to) |
| 51 | + |
| 52 | +### Cross-Browser Testing |
| 53 | +- [ ] Chrome (primary target) |
| 54 | +- [ ] Microsoft Edge (Chromium-based) |
| 55 | +- [ ] Brave (Chromium-based) |
| 56 | + |
| 57 | +### Edge Cases |
| 58 | +- [ ] Button positioning is correct and doesn't break layout |
| 59 | +- [ ] Buttons don't duplicate on dynamic page updates |
| 60 | +- [ ] Extension works with GitHub's dark and light themes |
| 61 | +- [ ] Extension works on private repositories |
| 62 | +- [ ] Extension works on organization repositories |
| 63 | +- [ ] Copy function works correctly with special characters in PR title |
| 64 | +- [ ] Extension doesn't interfere with other GitHub functionality |
| 65 | + |
| 66 | +## Manual Test Results |
| 67 | + |
| 68 | +### Test Environment |
| 69 | +- Browser: _____________ |
| 70 | +- Browser Version: _____________ |
| 71 | +- Date Tested: _____________ |
| 72 | +- Tester: _____________ |
| 73 | + |
| 74 | +### Feature 1 Results |
| 75 | +| Test Case | Status | Notes | |
| 76 | +|-----------|--------|-------| |
| 77 | +| Button appears | ⬜ Pass / ⬜ Fail | | |
| 78 | +| Copy to clipboard works | ⬜ Pass / ⬜ Fail | | |
| 79 | +| Format is correct | ⬜ Pass / ⬜ Fail | | |
| 80 | +| Visual feedback works | ⬜ Pass / ⬜ Fail | | |
| 81 | + |
| 82 | +### Feature 2 Results |
| 83 | +| Test Case | Status | Notes | |
| 84 | +|-----------|--------|-------| |
| 85 | +| Button appears on draft PR | ⬜ Pass / ⬜ Fail | | |
| 86 | +| Button hidden on non-draft PR | ⬜ Pass / ⬜ Fail | | |
| 87 | +| Click action works | ⬜ Pass / ⬜ Fail | | |
| 88 | +| Visual feedback works | ⬜ Pass / ⬜ Fail | | |
| 89 | + |
| 90 | +## Troubleshooting |
| 91 | + |
| 92 | +### Extension not loading |
| 93 | +1. Check that Developer mode is enabled in `chrome://extensions/` |
| 94 | +2. Verify all files (manifest.json, content.js, icons) are present |
| 95 | +3. Check for errors in the Extensions page |
| 96 | +4. Try removing and re-adding the extension |
| 97 | + |
| 98 | +### Buttons not appearing |
| 99 | +1. Open DevTools console (F12) and check for JavaScript errors |
| 100 | +2. Verify you're on a GitHub pull request page (URL: github.com/*/*/pull/*) |
| 101 | +3. Refresh the page |
| 102 | +4. Check if GitHub has changed their DOM structure (selectors might need updating) |
| 103 | + |
| 104 | +### Copy to clipboard not working |
| 105 | +1. Check browser permissions for clipboard access |
| 106 | +2. Try on a different GitHub PR page |
| 107 | +3. Check DevTools console for errors |
| 108 | +4. Ensure the page is loaded over HTTPS |
| 109 | + |
| 110 | +### Request Review button not working |
| 111 | +1. Verify the PR is actually in draft status |
| 112 | +2. Check that Copilot reviewer is available on the repository |
| 113 | +3. Check DevTools console for errors |
| 114 | +4. May need to manually adjust based on GitHub's current UI structure |
| 115 | + |
| 116 | +## Debugging Tips |
| 117 | + |
| 118 | +### View Extension Console Logs |
| 119 | +1. Go to `chrome://extensions/` |
| 120 | +2. Find "GitHub UI Mods" |
| 121 | +3. Click "Inspect views: background page" or inspect the content script from DevTools |
| 122 | + |
| 123 | +### Inspect Content Script |
| 124 | +1. Open any GitHub PR page |
| 125 | +2. Open DevTools (F12) |
| 126 | +3. Go to Console tab |
| 127 | +4. Look for messages from the extension |
| 128 | +5. Use Sources tab to set breakpoints in content.js |
| 129 | + |
| 130 | +### Test on Local HTML |
| 131 | +1. Open `test.html` in your browser |
| 132 | +2. Verify buttons appear on the simulated GitHub page |
| 133 | +3. This tests the extension logic without needing actual GitHub access |
| 134 | + |
| 135 | +## Known Limitations |
| 136 | + |
| 137 | +1. **Request Review functionality**: This feature attempts to automate clicking through GitHub's UI. If GitHub changes their DOM structure, this may break and require updates to the selectors in content.js. |
| 138 | + |
| 139 | +2. **Dynamic content**: GitHub uses dynamic content loading. The extension uses MutationObserver to handle this, but there may be edge cases where buttons don't appear immediately. |
| 140 | + |
| 141 | +3. **Permissions**: The extension only has access to GitHub pull request pages (for security and performance). |
| 142 | + |
| 143 | +## Reporting Issues |
| 144 | + |
| 145 | +If you encounter issues: |
| 146 | +1. Check the Troubleshooting section above |
| 147 | +2. Document the issue with: |
| 148 | + - Browser and version |
| 149 | + - GitHub page URL (without sensitive info) |
| 150 | + - Steps to reproduce |
| 151 | + - Console errors (if any) |
| 152 | + - Screenshots (if applicable) |
0 commit comments