Skip to content

Comments

test(wizard): use signals and detectChanges#1548

Merged
spliffone merged 1 commit intomainfrom
test/wizard-signal
Feb 19, 2026
Merged

test(wizard): use signals and detectChanges#1548
spliffone merged 1 commit intomainfrom
test/wizard-signal

Conversation

@ljanner
Copy link
Member

@ljanner ljanner commented Feb 18, 2026

Resolves #1528


Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 refactors the tests for the SiWizardComponent to align with modern Angular testing practices. The changes involve migrating from class properties to signal-based inputs in the test host component and replacing the custom runOnPushChangeDetection helper with the standard fixture.componentRef.setInput() and fixture.detectChanges() APIs. This simplifies the test code, improves readability, and removes unnecessary asynchronous operations from several tests, making them more efficient. The changes are well-executed and represent a good improvement to the test suite.

@ljanner ljanner marked this pull request as ready for review February 18, 2026 23:07
@ljanner ljanner requested review from a team as code owners February 18, 2026 23:07
Copilot AI review requested due to automatic review settings February 18, 2026 23:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the SiWizardComponent unit tests to stop using the runOnPushChangeDetection() helper and instead drive updates via signal-based inputs with fixture.componentRef.setInput(...) + fixture.detectChanges(), aligning with the approach requested in issue #1528.

Changes:

  • Removed usage of runOnPushChangeDetection() from the wizard spec.
  • Switched host bindings for hideNavigation and inlineNavigation to signal inputs (input(...)) and updated tests to set them via componentRef.setInput(...).
  • Converted affected async tests/hooks to synchronous ones where no async stabilization is needed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Copy link
Member

@spliffone spliffone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't necessary to use input for the HostComponent, can we use simple signals instead?

@ljanner
Copy link
Member Author

ljanner commented Feb 19, 2026

It isn't necessary to use input for the HostComponent, can we use simple signals instead?

Refactored to use simple signals 👍

@ljanner ljanner requested a review from spliffone February 19, 2026 11:37
@ljanner ljanner added the enhancement Topics that make the project better label Feb 19, 2026
@github-actions
Copy link

Code Coverage

@spliffone spliffone merged commit 5936a7f into main Feb 19, 2026
11 checks passed
@spliffone spliffone deleted the test/wizard-signal branch February 19, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Topics that make the project better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve wizard unit tests

2 participants