-
Notifications
You must be signed in to change notification settings - Fork 53
PM-13142: Fix PasteboardService and AutofillCredentialService tests #1000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1000 +/- ##
==========================================
- Coverage 89.05% 89.04% -0.01%
==========================================
Files 654 654
Lines 41057 41057
==========================================
- Hits 36562 36558 -4
- Misses 4495 4499 +4 ☔ View full report in Codecov by Sentry. |
No New Or Fixed Issues Found |
// identities for the active account, otherwise there's a potential race condition between | ||
// that and the tests below. | ||
waitFor { identityStore.removeAllCredentialIdentitiesCalled } | ||
identityStore.removeAllCredentialIdentitiesCalled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Just a quick for myself, is there a downside to making the init for DefaultAutofillCredentialService
async? Or is this something an Actor could help us with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could make it async, but I'm not sure if that would help us here. Since the init is subscribing to a publisher, we can't wait for it to complete, so how else would we know once it had finished the initial sync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah great point... I guess we could add another publisher to DefaultAutofillCredentialService which would emit when the the initial sync completes but that seems like overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another idea would be to use a PassthroughSubject
instead so there is no initial value but it doesn't have a buffer of the most-recent published value so maybe it's safer to leave it like it's now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I think we want the behavior in the app to trigger immediately with the initial value though.
🎟️ Tracking
PM-13142
📔 Objective
The following tests occasionally fail on CI. I think this should fix them from failing in the future.
https://github.com/bitwarden/ios/actions/runs/11129976827/job/30928320511
https://github.com/bitwarden/ios/actions/runs/11128380381/job/30922984525
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes