mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Add spectron test for zoom functionality (#948)
This commit is contained in:
@@ -26,6 +26,33 @@ class RobotActions {
|
||||
robot.keyToggle('f', 'up', [ 'command', 'control' ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zoom in via keyboard Command/Ctrl +
|
||||
*/
|
||||
public zoomIn(): void {
|
||||
const modifier = isMac ? [ 'command' ] : [ 'control' ];
|
||||
robot.keyToggle('+', 'down', modifier);
|
||||
robot.keyToggle('+', 'up', modifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zoom out via keyboard
|
||||
*/
|
||||
public zoomOut(): void {
|
||||
const modifier = isMac ? [ 'command' ] : [ 'control' ];
|
||||
robot.keyToggle('-', 'down', modifier);
|
||||
robot.keyToggle('-', 'up', modifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zoom reset via keyboard
|
||||
*/
|
||||
public zoomReset(): void {
|
||||
const modifier = isMac ? [ 'command' ] : [ 'control' ];
|
||||
robot.keyToggle('0', 'down', modifier);
|
||||
robot.keyToggle('0', 'up', modifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Click the App menu
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user