Skip to content

Feature/confirmation dialog options#110

Open
maaso wants to merge 2 commits intomasterfrom
feature/confirmation-dialog-options
Open

Feature/confirmation dialog options#110
maaso wants to merge 2 commits intomasterfrom
feature/confirmation-dialog-options

Conversation

@maaso
Copy link
Collaborator

@maaso maaso commented Feb 26, 2026

Added button & icon configuration options to ConfirmationDialog


async function createComponent(data: Partial<ConfirmationDialogData> = {}) {
await TestBed.configureTestingModule({
imports: [ConfirmationDialogComponent, MatDialogModule, MatButtonModule, NoopAnimationsModule],
Copy link
Member

@glenstaes glenstaes Feb 27, 2026

Choose a reason for hiding this comment

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

Use the provideNoopAnimations standalone provider instead of the NoopAnimationsModule import.

}
]
})
}).compileComponents()
Copy link
Member

Choose a reason for hiding this comment

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

Normally the .compileComponents should not be necessary, only when running the test outside of Angular compilation (which is not applicable here because we run ng test).

This avoids having to await this call and having to make createComponent async and therefore also the unit tests async.

Copy link
Member

Choose a reason for hiding this comment

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

There's still async and await keywords that can be removed :)

@maaso maaso force-pushed the feature/confirmation-dialog-options branch from b6000e4 to 2ed78d6 Compare February 27, 2026 09:49
@maaso maaso force-pushed the feature/confirmation-dialog-options branch from 2ed78d6 to 8629bc2 Compare February 27, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants