mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
test(menu): give menu space to open in alt positions
This commit is contained in:
@@ -117,6 +117,9 @@ describe('MdMenu', () => {
|
||||
trigger.style.position = 'relative';
|
||||
trigger.style.top = '600px';
|
||||
|
||||
// Push trigger to the right, so it has space to open "before"
|
||||
trigger.style.left = '100px';
|
||||
|
||||
fixture.componentInstance.trigger.openMenu();
|
||||
fixture.detectChanges();
|
||||
});
|
||||
@@ -145,7 +148,7 @@ describe('MdMenu', () => {
|
||||
// Push trigger to the right side of viewport, so it doesn't have space to open
|
||||
// in its default "after" position on the right side.
|
||||
trigger.style.position = 'relative';
|
||||
trigger.style.left = '900px';
|
||||
trigger.style.left = '950px';
|
||||
|
||||
fixture.componentInstance.trigger.openMenu();
|
||||
fixture.detectChanges();
|
||||
@@ -203,7 +206,7 @@ describe('MdMenu', () => {
|
||||
// push trigger to the bottom, right part of viewport, so it doesn't have space to open
|
||||
// in its default "after below" position.
|
||||
trigger.style.position = 'relative';
|
||||
trigger.style.left = '900px';
|
||||
trigger.style.left = '950px';
|
||||
trigger.style.top = '600px';
|
||||
|
||||
fixture.componentInstance.trigger.openMenu();
|
||||
|
||||
Reference in New Issue
Block a user