Skip to content
Permalink
Browse files

tree: test case

  • Loading branch information...
medha410 committed Jul 11, 2019
1 parent 7b8015f commit 049ce16df5061f02109a391efbb91432e06cf4e6
@@ -182,16 +182,62 @@ describe('amexio-treeview', () => {
});


it('Tree expandAll() on method call', () => {
let node: any;
comp.parentRef = true;
it('Tree expandAll() on if method call', () => {
let node = {
"text": "Web App",
"children": [
{
"text": "app",
"children": [
{
"leaf": true,
"text": "Application.js"
}
]
}
]
}
comp.parentRef = {
"text": "Web App",
"children": [
{
"text": "app",
"children": [
{
"leaf": true,
"text": "Application.js"
}
]
}
]
};
comp.expandAll(node);
comp.destroyExpandAll = setTimeout(() => {
expect(comp.parentRef).toBe(true);
expect(comp.parentRef).toBeDefined();
comp.expandAllCall(comp.parentRef);
}, 0);
});

it('Tree expandAll() on else method call', () => {
let node = {
"text": "Web App",
"children": [
{
"text": "app",
"children": [
{
"leaf": true,
"text": "Application.js"
}
]
}
]
}
comp.parentRef = null ;
comp.expandAll(node);
comp.destroyExpandAll = setTimeout(() => {
expect(comp.parentRef).toBe(null);
}, 0);
});
it('Tree updateComponent() on method call', () => {
comp.previousValue = '90';

@@ -18,7 +18,7 @@ import { FormBuilder, FormGroup, NgForm, NgModel } from '@angular/forms';
</amexio-step-wizard>`,
})
class TestWrapperComponent { }
fdescribe('amexio-step-wizard', () => {
describe('amexio-step-wizard', () => {
let component: StepWizardComponent;
let fixture: ComponentFixture<TestWrapperComponent>;
let service: DeviceQueryService;

0 comments on commit 049ce16

Please sign in to comment.
You can’t perform that action at this time.