Skip to content

Commit

Permalink
test(module:dropdown): fix the test (NG-ZORRO#1847)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored and vthinkxie committed Jul 19, 2018
1 parent 4cbcd6f commit b2a6d09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/dropdown/nz-dropdown.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ describe('dropdown', () => {
fixture.detectChanges();
expect(overlayContainerElement.textContent).not.toBe('');
const overlayPane = overlayContainerElement.querySelector('.cdk-overlay-pane') as HTMLElement;
expect(window.getComputedStyle(overlayPane, null).top).toBe('300px');
// https://github.com/angular/material2/pull/12119
expect(window.getComputedStyle(overlayPane, null).top).toBe(`${300 - overlayContainerElement.getBoundingClientRect().top}px`);
testComponent.nzDropdownService.close();
fixture.detectChanges();
expect(overlayContainerElement.textContent).toBe('');
Expand Down

0 comments on commit b2a6d09

Please sign in to comment.