-
-
Notifications
You must be signed in to change notification settings - Fork 371
test(account-dialog): add unit tests and 100% coverage for AccountDialogComponent #2871
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
base: master
Are you sure you want to change the base?
test(account-dialog): add unit tests and 100% coverage for AccountDialogComponent #2871
Conversation
Reviewer's GuideThis PR implements comprehensive Jest unit tests for AccountDialogComponent by setting up mock isolation, asserting default component state, verifying event emissions, and testing external link logic via API client mocks and externalUtils spies. Sequence diagram for external link opening in AccountDialogComponent testssequenceDiagram
participant Test as "Jest Test"
participant Component as "AccountDialogComponent"
participant API as "apiClient"
participant Utils as "externalUtils"
Test->>Component: call openBillingPage(event)
Component->>API: getBillingUrl()
API-->>Component: { url }
Component->>Utils: externalLink(url, event)
Test->>Component: call openUpgradeProUrl(event)
Component->>API: getUpgradeProUrl()
API-->>Component: { url }
Component->>Utils: externalLink(url, event)
Test->>Component: call buyCredits(event)
Component->>API: buyCredits()
API-->>Component: { url }
alt url exists
Component->>Utils: externalLink(url, event)
else url missing
Component-->>Utils: (no call)
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughAdds new unit tests to the account dialog component spec, importing API client and external utilities, introducing cases for defaults, event emissions, and link-opening behaviors for billing, upgrade, and credit purchase flows, including handling of empty URLs, with mocks cleared before each test. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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 |
Summary of ChangesHello @Sumit-13082004, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the test coverage and reliability of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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 there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts:58` </location>
<code_context>
+ expect(component.handleLoginChange.emit).toHaveBeenCalled();
+ });
+
+ it ('should open billing page with correct URL', async () => {
+ const mockUrl = 'https://billing.example.com';
+ jest.spyOn(apiClient, 'getBillingUrl').mockResolvedValue({ url: mockUrl });
</code_context>
<issue_to_address>
**issue (complexity):** Consider combining the repetitive API call and externalLink tests into a single parameterized test and one edge-case test to reduce boilerplate.
Consider collapsing the repetitive API‐call + `externalLink` tests into a small `test.each` (and one edge‐case test) instead of writing one `it` per method. For example:
```ts
// at top of your describe:
const linkScenarios = [
{ method: 'openBillingPage', api: 'getBillingUrl' },
{ method: 'openUpgradeProUrl', api: 'getUpgradeProUrl' },
{ method: 'buyCredits', api: 'buyCredits' },
];
beforeEach(() => {
jest.clearAllMocks();
});
// replaces the three “should open … with correct URL” tests:
test.each(linkScenarios)(
'%s calls apiClient.%s and externalLink when url is truthy',
async ({ method, api }) => {
const mockUrl = `https://${api}.example.com`;
jest.spyOn(apiClient, api).mockResolvedValue({ url: mockUrl });
const externalSpy = jest
.spyOn(externalUtils, 'externalLink')
.mockImplementation(() => {});
const ev = new MouseEvent('click');
// @ts-ignore
await component[method](ev);
expect(apiClient[api]).toHaveBeenCalled();
expect(externalSpy).toHaveBeenCalledWith(mockUrl, ev);
}
);
// edge case for buyCredits with empty URL
it('buyCredits does NOT call externalLink when url is empty', async () => {
jest.spyOn(apiClient, 'buyCredits').mockResolvedValue({ url: '' });
const externalSpy = jest
.spyOn(externalUtils, 'externalLink')
.mockImplementation(() => {});
const ev = new MouseEvent('click');
await component.buyCredits(ev);
expect(apiClient.buyCredits).toHaveBeenCalled();
expect(externalSpy).not.toHaveBeenCalled();
});
```
This shrinks eight tests into two, removes boilerplate, and keeps full coverage.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Code Review
This pull request adds a comprehensive suite of unit tests for the AccountDialogComponent
, achieving 100% test coverage. The tests are well-written and cover various aspects of the component's functionality. I have a couple of suggestions to improve the code quality further: removing an unused import and refactoring similar tests to reduce duplication. Overall, this is a great contribution to improving the test coverage of the application.
import { NO_ERRORS_SCHEMA } from '@angular/core'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { mount, NgxTestWrapper } from '../../../../../testing'; | ||
import { mock, mount, NgxTestWrapper } from '../../../../../testing'; |
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.
it ('should open billing page with correct URL', async () => { | ||
const mockUrl = 'https://billing.example.com'; | ||
jest.spyOn(apiClient, 'getBillingUrl').mockResolvedValue({ url: mockUrl }); | ||
const mockEvent = new MouseEvent('click'); | ||
const externalSpy = jest.spyOn(externalUtils, 'externalLink').mockImplementation(() => {}); | ||
|
||
await component.openBillingPage(mockEvent); | ||
|
||
expect(apiClient.getBillingUrl).toHaveBeenCalledWith(); | ||
expect(externalSpy).toHaveBeenCalledWith(mockUrl, mockEvent); | ||
}); | ||
|
||
it ('should call getUpgradeProUrl and open external link', async () => { | ||
const mockUrl = 'https://upgrade.example.com'; | ||
jest.spyOn(apiClient, 'getUpgradeProUrl').mockResolvedValue({ url: mockUrl }); | ||
const mockEvent = new MouseEvent('click'); | ||
const externalSpy = jest.spyOn(externalUtils, 'externalLink').mockImplementation(() => {}); | ||
|
||
await component.openUpgradeProUrl(mockEvent); | ||
|
||
expect(apiClient.getUpgradeProUrl).toHaveBeenCalledWith(); | ||
expect(externalSpy).toHaveBeenCalledWith(mockUrl, mockEvent); | ||
}); | ||
|
||
it ('should call buyCredits and open external link if url exists', async () => { | ||
const mockUrl = 'https://credits.example.com'; | ||
jest.spyOn(apiClient, 'buyCredits').mockResolvedValue({ url: mockUrl }); | ||
const mockEvent = new MouseEvent('click'); | ||
const externalSpy = jest.spyOn(externalUtils, 'externalLink').mockImplementation(() => {}); | ||
|
||
await component.buyCredits(mockEvent); | ||
|
||
expect(apiClient.buyCredits).toHaveBeenCalledWith(); | ||
expect(externalSpy).toHaveBeenCalledWith(mockUrl, mockEvent); | ||
}); |
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.
These three tests for openBillingPage
, openUpgradeProUrl
, and buyCredits
are very similar in structure. To improve maintainability and reduce code duplication, you could refactor them into a single parameterized test using Jest's it.each
.
it.each([
{ method: 'openBillingPage', api: 'getBillingUrl', url: 'https://billing.example.com' },
{ method: 'openUpgradeProUrl', api: 'getUpgradeProUrl', url: 'https://upgrade.example.com' },
{ method: 'buyCredits', api: 'buyCredits', url: 'https://credits.example.com' },
])('should call $api and open external link for $method', async ({ method, api, url }) => {
jest.spyOn(apiClient, api as keyof typeof apiClient).mockResolvedValue({ url });
const mockEvent = new MouseEvent('click');
const externalSpy = jest.spyOn(externalUtils, 'externalLink').mockImplementation(() => {});
await (component as any)[method](mockEvent);
expect(apiClient[api as keyof typeof apiClient]).toHaveBeenCalledWith();
expect(externalSpy).toHaveBeenCalledWith(url, mockEvent);
});
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
{**/__tests__/**/*.ts,**/*.{spec,test}.ts}
📄 CodeRabbit inference engine (.github/instructions/app-testing.instructions.md)
{**/__tests__/**/*.ts,**/*.{spec,test}.ts}
: Use Jest as the testing framework for all tests
Organize tests next to the code under test: use a tests folder or .test.ts/.spec.ts files alongside sources
Use clear, descriptive test names explaining what is being verified
Mock dependencies with Jest to isolate the unit under test
Leverage TypeScript types in tests; define interfaces/types for expected data shapes
Files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
**/*.ts
📄 CodeRabbit inference engine (.github/instructions/app-testing.instructions.md)
Follow project code style using ESLint and Prettier
Files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
packages/altair-app/src/app/modules/altair/components/**/*.spec.ts
📄 CodeRabbit inference engine (.github/instructions/app-testing.instructions.md)
packages/altair-app/src/app/modules/altair/components/**/*.spec.ts
: Only write tests for component business logic; do not test UI libraries (e.g., ng-zorro, Angular Material)
Test component business logic and methods
Test event emissions using wrapper.emitted()
Test state management and property changes of components
Test component lifecycle behavior
Always cover edge cases (null, rapid calls, invalid inputs) in component tests
Verify method return values and side effects in components
Test component interactions with services using mocks
Do not test UI library component props (e.g., nz-modal, nz-button)
Do not test template rendering details
Do not test third-party library behavior
Do not test Angular framework internals
Do not test CSS styling or visual appearance
Access component under test via wrapper.componentInstance for properties and methods
Use wrapper.emitted() to assert emitted events
Focus on asserting state changes in response to actions
Always include tests for error and edge conditions
Avoid fragile emission index tracking across multiple actions in a single test; isolate scenarios per it block
Files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
packages/altair-app/**
📄 CodeRabbit inference engine (.github/instructions/main.instructions.md)
Implement and modify the main frontend (Angular) in packages/altair-app
Files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Always cover edge cases (null, rapid calls, invalid inputs) in component tests
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test component interactions with services using mocks
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Prefer unit tests; add integration tests for inter-component flows and E2E if applicable
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test component business logic and methods
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test state management and property changes of components
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test component interactions with services using mocks
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test component lifecycle behavior
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Focus on asserting state changes in response to actions
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test component business logic and methods
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Verify method return values and side effects in components
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Always cover edge cases (null, rapid calls, invalid inputs) in component tests
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Always include tests for error and edge conditions
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Only write tests for component business logic; do not test UI libraries (e.g., ng-zorro, Angular Material)
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Avoid fragile emission index tracking across multiple actions in a single test; isolate scenarios per it block
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Access component under test via wrapper.componentInstance for properties and methods
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Do not test Angular framework internals
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:57.402Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/main.instructions.md:0-0
Timestamp: 2025-09-24T19:40:57.402Z
Learning: Ensure changes are covered by appropriate tests (unit, integration, e2e); the project primarily uses Jest
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
📚 Learning: 2025-09-24T19:40:17.875Z
Learnt from: CR
PR: altair-graphql/altair#0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.875Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test event emissions using wrapper.emitted()
Applied to files:
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
🧬 Code graph analysis (1)
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts (2)
packages/altair-app/src/testing/wrapper/index.ts (1)
component
(33-35)packages/altair-app/src/app/modules/altair/services/api/api.service.ts (1)
apiClient
(15-17)
🪛 Biome (2.1.2)
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
[error] 30-30: Disallow duplicate setup and teardown hooks.
Disallow beforeEach duplicacy inside the describe function.
(lint/suspicious/noDuplicateTestHooks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Sourcery review
🔇 Additional comments (9)
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts (9)
5-5
: LGTM: good use of the custom mount wrapper.Mounting via the shared testing utilities keeps the spec concise and consistent.
9-10
: LGTM: dependencies are correctly imported for spying.Spying on apiClient and externalUtils at module level is appropriate here.
36-38
: LGTM: verifies default state (showDialog).Solid state assertion aligned with business logic.
40-42
: LGTM: verifies default account state.Covers the initial undefined case.
52-56
: LGTM: emits on submitLogin.Directly testing the method emission matches the guidelines to focus on component logic.
58-69
: LGTM: billing flow happy path covered.Mocks the URL fetch and asserts externalLink invocation with correct args.
Consider adding a failure-path test (mockRejectedValue) to ensure no unhandled rejections if getBillingUrl fails.
70-81
: LGTM: upgrade flow happy path covered.Appropriate spy/assertions.
Similarly, consider a rejection-path test for getUpgradeProUrl.
82-93
: LGTM: credits purchase (URL present) covered.Validates both api call and external navigation.
94-103
: LGTM: credits purchase (empty URL) edge case covered.Good guard against accidental navigation on empty URLs.
beforeEach(() => jest.clearAllMocks()); | ||
|
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.
Fix duplicate test hook (Biome: noDuplicateTestHooks).
Two beforeEach hooks in the same describe block violate the linter. Move mock clearing to an afterEach or merge it into the first beforeEach.
Apply this diff:
- beforeEach(() => jest.clearAllMocks());
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
Additionally, consider avoiding a second component instantiation. Use the wrapper’s instance instead of TestBed.createComponent to reduce flakiness:
// replace:
fixture = TestBed.createComponent(AccountDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
// with:
component = wrapper.component.componentInstance;
🧰 Tools
🪛 Biome (2.1.2)
[error] 30-30: Disallow duplicate setup and teardown hooks.
Disallow beforeEach duplicacy inside the describe function.
(lint/suspicious/noDuplicateTestHooks)
🤖 Prompt for AI Agents
In
packages/altair-app/src/app/modules/altair/components/account-dialog/account-dialog.component.spec.ts
around lines 30-31, there are two beforeEach hooks causing the
noDuplicateTestHooks lint error; move the jest.clearAllMocks() call into an
afterEach (or merge it into the existing beforeEach) to remove the duplicate
hook, and replace the second component instantiation by using the wrapper’s
component instance instead of calling TestBed.createComponent again (i.e., set
the component from wrapper.component.componentInstance and remove
fixture.detectChanges()/recreation to avoid flakiness).
Fixes
This PR helps fix issue #1717 by adding comprehensive unit tests for AccountDialogComponent (component + template).
Files changed
Coverage
The tests provide 100% coverage...
Summary by Sourcery
Add comprehensive unit tests for AccountDialogComponent to achieve 100% coverage, verifying component rendering, default state, event emissions, and external link behavior.
Tests:
Summary by CodeRabbit