Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('', () => {
configureTestSuite(genModule);
beforeEach(fakeAsync(() => createComp()));
describe('[default]', () => {
it('should be create an instance', fakeAsync(() => {
page.expectCount(1);
}));
it('should be add a tab when route changed', fakeAsync(() => {
page.to('#b').expectCount(2);
}));
it('should be change tab via click', fakeAsync(() => {
expect(layoutComp.change).not.toHaveBeenCalled();
page.to('#b').go(0);
expect(layoutComp.change).toHaveBeenCalled();
}));
it('should be two tab in routing parameters', fakeAsync(() => {
describe('', () => {
configureTestSuite(genModule);
it('should be not length & line', () => {
fixture = TestBed.createComponent(TestLengthComponent);
dl = fixture.debugElement;
context = fixture.componentInstance;
context.lines = null;
context.length = null;
fixture.detectChanges();
page = new PageObject();
fixture.detectChanges();
page.checkCls('.ellipsis', 1);
});
describe('#length', () => {
beforeEach(() => {
fixture = TestBed.createComponent(TestLengthComponent);
describe('', () => {
configureTestSuite(createModule);
describe('[default]', () => {
it('should be navigate url', () => {
createComp();
spyOn(context, 'select');
const data = deepCopy(MOCKMENUS);
menuSrv.add(data);
expect(context.select).not.toHaveBeenCalled();
expect(router.navigateByUrl).not.toHaveBeenCalled();
const itemEl = page.getEl('.sidebar-nav__depth1 a');
itemEl!.click();
fixture.detectChanges();
expect(context.select).toHaveBeenCalled();
expect(router.navigateByUrl).toHaveBeenCalled();
});
describe('', () => {
configureTestSuite(moduleAction);
it('General Configuration', inject([SGConfig], (cog: SGConfig) => {
cog.gutter = 24;
({ fixture, dl, context } = createTestContext(TestComponent));
expect(context.sgComp.col).toBe(2);
expect(context.sgComp.gutter).toBe(24);
}));
describe('[property]', () => {
beforeEach(() => {
({ fixture, dl, context } = createTestContext(TestComponent));
fixture.detectChanges();
page = new PageObject();
});
describe('#wrap', () => {
it('#gutter', () => {
const gutter = 24;
describe('', () => {
configureTestSuite(moduleAction);
it('General Configuration', inject([SEConfig], (cog: SEConfig) => {
cog.size = 'compact';
({ fixture, dl, context } = createTestContext(TestComponent));
expect(context.seComp.size).toBe('compact');
expect(context.seComp.nzLayout).toBe('horizontal');
expect(context.seComp.gutter).toBe(32);
}));
describe('', () => {
beforeEach(createComp);
describe('[property]', () => {
describe('#wrap', () => {
it('#title', () => {
context.parent_title = `parent_title`;
fixture.detectChanges();
describe('', () => {
configureTestSuite(moduleAction);
it('General Configuration', inject([SVConfig], (cog: SVConfig) => {
cog.gutter = 24;
({ fixture, dl, context } = createTestContext(TestComponent));
expect(context.svComp.col).toBe(3);
expect(context.svComp.gutter).toBe(24);
}));
describe('[property]', () => {
beforeEach(() => {
({ fixture, dl, context } = createTestContext(TestComponent));
fixture.detectChanges();
page = new PageObject();
});
describe('#wrap', () => {
it('#title', () => {
export function configureSFTestSuite() {
configureTestSuite(() => {
TestBed.configureTestingModule({
imports: [NoopAnimationsModule, AlainThemeModule.forRoot(), DelonFormModule.forRoot(), HttpClientTestingModule],
declarations: [TestFormComponent],
});
});
}