本文整理汇总了TypeScript中@angular-mdc/web.MdcTabBarScroller类的典型用法代码示例。如果您正苦于以下问题:TypeScript MdcTabBarScroller类的具体用法?TypeScript MdcTabBarScroller怎么用?TypeScript MdcTabBarScroller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MdcTabBarScroller类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: describe
describe('behaviors', () => {
let testDebugElement: DebugElement;
let testNativeElement: HTMLElement;
let testInstance: MdcTabBarScroller;
let testComponent: ScrollingTabs;
beforeEach(() => {
fixture = TestBed.createComponent(ScrollingTabs);
fixture.detectChanges();
testDebugElement = fixture.debugElement.query(By.directive(MdcTabBarScroller));
testNativeElement = testDebugElement.nativeElement;
testInstance = testDebugElement.componentInstance;
testComponent = fixture.debugElement.componentInstance;
});
it('#should have mdc-tab-bar-scroller by default', () => {
expect(testDebugElement.nativeElement.classList)
.toContain('mdc-tab-bar-scroller', 'Expected to have mdc-tab-bar-scroller');
});
it('#should scrollToTabAtIndex', () => {
expect(testInstance.scrollToTabAtIndex(2));
});
it('#should scroll forward', () => {
expect(testInstance.scrollForward());
});
it('#should scroll back', () => {
expect(testInstance.scrollBack());
});
it('#should refresh layout', () => {
expect(testInstance.layout());
});
});
示例2: it
it('#should refresh layout', () => {
expect(testInstance.layout());
});