Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

chore(menu): Remove simple from naming #625

Merged
merged 3 commits into from
Feb 7, 2018
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
8 changes: 4 additions & 4 deletions src/lib/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
} from '@angular/core';
import { isBrowser, toBoolean, EventRegistry } from '@angular-mdc/web/common';

import { MDCMenuAdapter } from '@material/menu/simple/adapter';
import { MDCSimpleMenuFoundation, util, Corner } from '@material/menu';
import { MDCMenuAdapter } from '@material/menu/adapter';
import { MDCMenuFoundation, util, Corner } from '@material/menu';

export type MdcMenuAnchorCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';

Expand Down Expand Up @@ -48,7 +48,7 @@ export class MdcMenuDivider {
})
export class MdcMenuItems {
@HostBinding('class.mdc-list') isHostClass = true;
@HostBinding('class.mdc-simple-menu__items') isSelectClass = true;
@HostBinding('class.mdc-menu__items') isSelectClass = true;
@HostBinding('attr.role') role: string = 'menu';
@HostBinding('attr.aria-hidden') ariaHidden: string = 'true';

Expand Down Expand Up @@ -111,7 +111,7 @@ export class MdcMenu implements AfterViewInit, OnChanges, OnDestroy {
@Input() direction: 'ltr' | 'rtl' = 'ltr';
@Output() cancel: EventEmitter<void> = new EventEmitter<void>();
@Output() select: EventEmitter<any> = new EventEmitter();
@HostBinding('class.mdc-simple-menu') isHostClass = true;
@HostBinding('class.mdc-menu') isHostClass = true;
@HostBinding('tabindex') tabindex: number = -1;
@ViewChild(MdcMenuItems) menuContainer: MdcMenuItems;
@ContentChildren(MdcMenuItem) options: QueryList<MdcMenuItem>;
Expand Down
12 changes: 6 additions & 6 deletions test/unit/menu/menu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('MdcMenu', () => {
TestBed.configureTestingModule({
imports: [MdcMenuModule],
declarations: [
SimpleTest,
MenuTest,
]
});
TestBed.compileComponents();
Expand All @@ -20,20 +20,20 @@ describe('MdcMenu', () => {
describe('basic behaviors', () => {
let testDebugElement: DebugElement;
let testInstance: MdcMenu;
let testComponent: SimpleTest;
let testComponent: MenuTest;

beforeEach(() => {
fixture = TestBed.createComponent(SimpleTest);
fixture = TestBed.createComponent(MenuTest);
fixture.detectChanges();

testDebugElement = fixture.debugElement.query(By.directive(MdcMenu));
testInstance = testDebugElement.componentInstance;
testComponent = fixture.debugElement.componentInstance;
});

it('#should have mdc-simple-menu by default', () => {
it('#should have mdc-menu by default', () => {
expect(testDebugElement.nativeElement.classList)
.toContain('mdc-simple-menu', 'Expected to have mdc-simple-menu');
.toContain('mdc-menu', 'Expected to have mdc-menu');
});

it('#should be closed', () => {
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('MdcMenu', () => {
</div>
`,
})
class SimpleTest {
class MenuTest {
anchorCorner: string = 'top-start';
isDisabled: boolean = true;
selectedIndex: number = -1;
Expand Down