Skip to content

Commit 84794c1

Browse files
committed
test(nav-drawer): testing if nav-drawer retains classes, #6508
1 parent c82a959 commit 84794c1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

projects/igniteui-angular/src/lib/navigation-drawer/navigation-drawer.component.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { PlatformUtil } from '../core/utils';
1212
declare var Simulator: any;
1313
const oldTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
1414

15-
describe('Navigation Drawer', () => {
15+
fdescribe('Navigation Drawer', () => {
1616
let widthSpyOverride: jasmine.Spy;
1717
// configureTestSuite();
1818
beforeEach(async(() => {
@@ -571,6 +571,14 @@ describe('Navigation Drawer', () => {
571571
done();
572572
});
573573

574+
it('should retain classes added in markup, fix for #6508', () => {
575+
const fix = TestBed.createComponent(TestComponent);
576+
fix.detectChanges();
577+
578+
expect(fix.componentInstance.navDrawer.element.classList.contains('markupClass')).toBeTruthy();
579+
expect(fix.componentInstance.navDrawer.element.classList.contains('igx-nav-drawer')).toBeTruthy();
580+
});
581+
574582
function swipe(element, posX, posY, duration, deltaX, deltaY) {
575583
const swipeOptions = {
576584
deltaX,
@@ -610,7 +618,7 @@ describe('Navigation Drawer', () => {
610618

611619
@Component({
612620
selector: 'igx-test-cmp',
613-
template: '<igx-nav-drawer></igx-nav-drawer>'
621+
template: '<igx-nav-drawer class="markupClass"></igx-nav-drawer>'
614622
})
615623
class TestComponent {
616624
@ViewChild(IgxNavigationDrawerComponent, { static: true }) public navDrawer: IgxNavigationDrawerComponent;

0 commit comments

Comments
 (0)