Support on MAC (#456)

This commit is contained in:
Truong Pham 2018-08-13 15:54:04 +07:00 committed by Vishwas Shashidhar
parent f6db6b08db
commit d92a123f32
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ const WindowsActions = require('./spectronWindowsActions');
let app = new Application({});
let windowActions;
!isMac ? describe('Tests for Resizing windows', () => {
describe('Tests for Resizing windows', () => {
let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = Application.getTimeOut();
@ -46,4 +46,4 @@ let windowActions;
done.fail(new Error(`failed to minimize window to 300 px with error: ${err}`));
}
});
}) : describe.skip();
});

View File

@ -23,7 +23,8 @@ class WindowsActions {
let x = bounds.x + (bounds.width - width);
let y = bounds.y + (bounds.height - height);
robot.setMouseDelay(500);
robot.moveMouse(bounds.x, bounds.y);
// Plus 2 pixels to make sure this function works well on MAC
robot.moveMouse(bounds.x + 2, bounds.y + 2);
robot.mouseToggle("down");
robot.dragMouse(x, y);
robot.mouseToggle("up");