-
Notifications
You must be signed in to change notification settings - Fork 295
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
General
: Update client tests documentation
#9913
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe changes in this pull request focus on enhancing the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
docs/dev/guidelines/client-tests.rst (3)
62-79
: Consider enhancing the "bad practice" example explanation.While the example effectively demonstrates performance issues, consider adding explicit warnings about:
- Why ArtemisTestModule should be avoided in component tests
- The impact of importing production modules on test isolation
159-168
: Consider adding context for HTTP testing changes.While the updated HTTP testing example correctly uses modern Angular providers, consider adding:
- Why provideHttpClient() is preferred over HttpClientTestingModule
- Benefits of the new approach
228-238
: Consider enhancing the template override warning.While the example clearly shows what not to do, consider adding:
- Why testing with the actual template is important
- Common issues that arise from template overrides
- Alternative approaches for template-related testing challenges
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
docs/dev/guidelines/client-tests.rst
(7 hunks)
🔇 Additional comments (3)
docs/dev/guidelines/client-tests.rst (3)
Line range hint 22-36
: LGTM! Clear and modern test setup example.
The updated TestBed configuration example demonstrates best practices by:
- Using async/await pattern for better readability
- Properly structuring component initialization
- Following Angular's recommended testing patterns
Line range hint 97-117
: LGTM! Excellent demonstration of test optimization.
The example effectively shows:
- Proper use of mock components and testing modules
- Significant performance improvements (25x faster)
- Clear separation of concerns
Line range hint 1-368
: LGTM! Comprehensive and well-structured documentation update.
The documentation successfully:
- Aligns with modern Angular testing practices
- Provides clear examples of best practices and anti-patterns
- Includes practical performance considerations
- Offers specific guidance for common testing scenarios
@@ -19,9 +19,8 @@ The most basic test looks similar to this: | |||
let someComponent: SomeComponent; | |||
|
|||
beforeEach(() => { |
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.
beforeEach(() => { | |
beforeEach(async () => { |
I guess this is required now due to the await TestBed.…
?
@@ -61,23 +59,24 @@ Some guidelines: | |||
... | |||
|
|||
beforeEach(() => { |
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.
beforeEach(() => { | |
beforeEach(async () => { |
@@ -95,9 +94,11 @@ Some guidelines: | |||
... | |||
|
|||
beforeEach(() => { |
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.
beforeEach(() => { | |
beforeEach(async () => { |
@@ -222,20 +225,17 @@ Some guidelines: | |||
let someComponent: SomeComponent; | |||
|
|||
beforeEach(() => { |
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.
beforeEach(() => { | |
beforeEach(async () => { |
Checklist
General
Client
Motivation and Context
Regarding the Client Migration Process the client test documentation should also be updated.
Description
This PR updates the client tests documentation to the newest Angular standards.
Updated documentation page
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Summary by CodeRabbit