Skip to content

Conversation

@thePunderWoman
Copy link
Contributor

This adds a test module configuration to define whether animations should be enabled or disabled in test. By default, they are disabled.

Does this PR introduce a breaking change?

  • Yes
  • No

@thePunderWoman thePunderWoman added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: minor This PR is targeted for the next minor release labels Jul 23, 2025
@ngbot ngbot bot modified the milestone: Backlog Jul 23, 2025
{provide: Compiler, useFactory: () => new R3TestCompiler(this)},
{provide: DEFER_BLOCK_CONFIG, useValue: {behavior: this.deferBlockBehavior}},
{
provide: ANIMATIONS_DISABLED,
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to expose this token to users, instead of exposing new options on TestBed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I originally had this token exposed as public api, but before landing the feat commit, I was asked to remove it from public api in favor of this approach. I'm sure @AndrewKushnir could provide more thoughts.

Copy link
Contributor

Choose a reason for hiding this comment

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

The idea was to put the configuration into the testing context. Originally, the token was exposed via @angular/core, we could've expose it via @angular/core/testing, but in this case having a TestBed config looks more consistent (we had a similar config for defer block behavior).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The added benefit here is that testbed defaults to animations disabled. So by default they'd only have to provide a configuration if they actually did want to test animations running.

@pullapprove pullapprove bot requested a review from atscott July 23, 2025 14:42
{provide: Compiler, useFactory: () => new R3TestCompiler(this)},
{provide: DEFER_BLOCK_CONFIG, useValue: {behavior: this.deferBlockBehavior}},
{
provide: ANIMATIONS_DISABLED,
Copy link
Contributor

Choose a reason for hiding this comment

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

The idea was to put the configuration into the testing context. Originally, the token was exposed via @angular/core, we could've expose it via @angular/core/testing, but in this case having a TestBed config looks more consistent (we had a similar config for defer block behavior).

@pullapprove pullapprove bot requested a review from AndrewKushnir July 23, 2025 22:33
@thePunderWoman thePunderWoman force-pushed the animation-testing branch 5 times, most recently from 9b484d1 to 8c5ef47 Compare July 24, 2025 17:59
This adds a test module configuration to define whether animations should be enabled or disabled in test. By default, they are disabled.
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback 👍

@pullapprove pullapprove bot requested a review from AndrewKushnir July 24, 2025 19:11
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@pullapprove pullapprove bot requested a review from crisbeto July 24, 2025 19:12
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 29, 2025
@thePunderWoman
Copy link
Contributor Author

This PR was merged into the repository by commit 898244a.

The changes were merged into the following branches: main

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 29, 2025
@thePunderWoman thePunderWoman deleted the animation-testing branch September 12, 2025 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants