mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
873badf389
* Spectron - Initial commit * Spectron - Only run unit tests on travis * Spectron - Update npm script to copy config and refactor * Spectron - Update readme * Spectron - update test cases * Spectron - Merge upstream Spectron * Spectron - Update spectron to 10.0.0 and fix issues * Spectron - rename travis file * Spectron - install linux specific dependency * Spectron - Fix indentation * Spectron - Fix indentation * Spectron - Remove unwanted script * fix typo
35 lines
880 B
TypeScript
35 lines
880 B
TypeScript
import test from 'ava';
|
|
import * as robot from 'robotjs';
|
|
import { Application } from 'spectron';
|
|
import { robotActions } from './fixtures/robot-actions';
|
|
|
|
import {
|
|
getDemoFilePath, loadURL,
|
|
sleep,
|
|
startApplication,
|
|
stopApplication,
|
|
Timeouts,
|
|
} from './fixtures/spectron-setup';
|
|
|
|
let app;
|
|
|
|
test.before(async (t) => {
|
|
app = await startApplication() as Application;
|
|
t.true(app.isRunning());
|
|
});
|
|
|
|
test.after.always(async () => {
|
|
await stopApplication(app);
|
|
});
|
|
|
|
test('fullscreen: verify application full screen feature', async (t) => {
|
|
await loadURL(app, getDemoFilePath());
|
|
await app.client.waitUntilWindowLoaded(Timeouts.fiveSec);
|
|
robotActions.toggleFullscreen();
|
|
t.true(await app.browserWindow.isFullScreen());
|
|
|
|
await sleep(Timeouts.halfSec);
|
|
robot.keyTap('escape');
|
|
t.false(await app.browserWindow.isFullScreen());
|
|
});
|