-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Ai writer test #7660
base: main
Are you sure you want to change the base?
Ai writer test #7660
Conversation
Reviewer's Guide by SourceryThis PR adds comprehensive tests for the AI writer feature, including bloc unit tests and integration tests. It introduces a mock AI repository to facilitate testing and covers various AI writer commands such as 'improve writing', 'fix grammar', and 'ask AI'. The tests verify the correct behavior of the AI writer in different scenarios, including accepting and discarding suggestions, and ensure that the document is updated as expected. Sequence diagram for AI Writer Completion StreamsequenceDiagram
participant User
participant AiWriterCubit
participant AIRepository
participant AIModel
User->>AiWriterCubit: Request Completion
AiWriterCubit->>AIRepository: streamCompletion(text, format)
AIRepository->>AIModel: Call AI Model API
AIModel-->>AIRepository: Return Completion Stream
AIRepository-->>AiWriterCubit: Return (String, CompletionStream)?
AiWriterCubit-->>User: Update UI with Streaming Results
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @appflowy - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding more specific test case names to improve readability.
- The introduction of
registerMockRepository
looks good for testability.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
test_1.mov |
a2bb101
to
e83f4ca
Compare
e83f4ca
to
72fe1d7
Compare
c47ede8
to
5c99572
Compare
Feature Preview
PR Checklist
Summary by Sourcery
Enhance AI writer testing infrastructure by adding mock AI repository and improving test coverage for AI-related features in the document editor
New Features:
Enhancements:
Tests: