test: expand configdialog and keygendialog test suites#1501
Conversation
gpgkeystate: 23 → 27 tests — adds edge cases not previously covered: empty input returns an empty list; pub record without any uid record is still included; orphan sub/ssb records without a pub parent are ignored; short colon-separated lines (fewer than GPG_MIN_FIELDS) are silently skipped. storemodel: 31 → 34 tests — adds: setStore() updates the value returned by getStore(); data() with Qt::EditRole does not strip the .gpg suffix (only DisplayRole does); a non-.gpg file whose name matches the regex filter is accepted by filterAcceptsRow (documents that the model does not restrict to .gpg only at the filter layer). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- tst_configdialog: 9 → 14 tests — adds coverage for useTrayIcon (skipped if no tray), useQrencode, setPwgenPath (value + empty- disables-checkbox), and setPasswordConfiguration/getPasswordConfiguration round-trip - tst_keygendialog: 6 → 10 tests — adds empty-passphrase no-protection path, second-passphrase change triggering state update, clearing first passphrase disabling buttonBox, and simultaneous name+email template update Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds 15 Qt test slots across four test suites: ConfigDialog UI/state and PasswordConfiguration round-trip tests; GpgKeyState parseGpgColonOutput edge-case tests; KeygenDialog passphrase and template tests; and StoreModel setter/data/filter tests. No production code changed. ChangesTest Coverage Expansion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/auto/model/tst_storemodel.cpp`:
- Around line 559-585: Rename the test function
tst_storemodel::filterHidesNonGpgFile to a name that matches its behavior (for
example filterAcceptsNonGpgFileMatchingRegex or
filterDoesNotRestrictToGpgFilesOnly) and update its declaration/definition so
both the prototype and implementation use the new identifier (change the
function name at the definition shown and the corresponding declaration near the
top of the test file). Ensure any references in test registration or test macro
use the new name as well.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: d2af0521-941f-4b9f-8ba8-fee15616784c
📒 Files selected for processing (4)
tests/auto/configdialog/tst_configdialog.cpptests/auto/gpgkeystate/tst_gpgkeystate.cpptests/auto/keygendialog/tst_keygendialog.cpptests/auto/model/tst_storemodel.cpp
Fix three clang-format violations introduced in the previous commit: - tst_configdialog: collapse two short QVERIFY2 calls onto single lines - tst_keygendialog: wrap an over-length QVERIFY2 message string Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Summary
tst_configdialog: 9 → 14 tests — covers the remaining publicuseXAPI:useTrayIcon(skips on headless),useQrencode,setPwgenPath(path value + empty disables checkbox), andsetPasswordConfiguration/getPasswordConfigurationround-triptst_keygendialog: 6 → 10 tests — adds empty-passphrase no-protection mode path, second-passphrase change triggering button-box state update, clearing first passphrase disabling button-box, and simultaneous name+email template updateTest plan
make checkpasses locally — configdialog 15/15 (1 expected SKIP for no-system-tray), keygendialog 12/12🤖 Generated with Claude Code
Summary by CodeRabbit