Skip to content

Commit

Permalink
chore(dropdown): Adding height/width tests #984
Browse files Browse the repository at this point in the history
  • Loading branch information
dafo committed May 8, 2018
1 parent 4bed6b3 commit d8d8455
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/drop-down/drop-down.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,26 @@ fdescribe("IgxDropDown ", () => {
expect(currentItem.componentInstance.index).toEqual(1);
});
});

it("Change width/height at runtime", () => {
const fixture = TestBed.createComponent(IgxDropDownTestDisabledComponent);
fixture.detectChanges();
const button = fixture.debugElement.query(By.css("button")).nativeElement;
const list = fixture.componentInstance.dropdownDisabled;
const listItems = list.items;
expect(list).toBeDefined();
expect(list.items.length).toEqual(13);
fixture.componentInstance.dropdownDisabled.width = "80%";
fixture.componentInstance.dropdownDisabled.height = "400px";
button.click();
fixture.whenStable().then(() => {
fixture.detectChanges();
// tslint:disable-next-line:no-debugger
debugger;
expect(fixture.componentInstance.dropdownDisabled.height).toEqual("400px");
expect(fixture.componentInstance.dropdownDisabled.width).toEqual("80%");
});
});
});

@Component({
Expand Down

0 comments on commit d8d8455

Please sign in to comment.