fix(material/menu): missing panelClass getter by ok7sai · Pull Request #33191 · angular/components · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions goldens/material/menu/index.api.md
9 changes: 9 additions & 0 deletions src/material/menu/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,15 @@ describe('MatMenu', () => {
expect(panel.classList).toContain('custom-two');
});

it('should expose the configured classes via the getter', () => {
const fixture = TestBed.createComponent(SimpleMenu);
fixture.componentInstance.panelClass = 'custom-one custom-two';
fixture.detectChanges();

expect(fixture.componentInstance.menu.panelClass).toBe('custom-one custom-two');
expect(fixture.componentInstance.menu.classList).toBe('custom-one custom-two');
});

it('should set the "menu" role on the overlay panel', () => {
const fixture = TestBed.createComponent(SimpleMenu);
fixture.detectChanges();
Expand Down
5 changes: 4 additions & 1 deletion src/material/menu/menu.ts
Loading