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 wenqi73 committed Aug 27, 2018
1 parent 2f2ecb4 commit 8d11f09
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 8d11f09

Please sign in to comment.