Dependency audit / audit (push) Canceled after 0s
CI / plan (push) Canceled after 0s
Gitoxide helper admission / macos-latest (push) Canceled after 0s
Gitoxide helper admission / ubuntu-latest (push) Canceled after 0s
Gitoxide helper admission / windows-latest (push) Canceled after 0s
Runtime Host peer admission / quality (push) Canceled after 0s
Windows recovery / windows_recovery (push) Canceled after 0s
CI / heavy (push) Canceled after 0s
CI / test (push) Canceled after 0s
51 lines
1.7 KiB
JavaScript
51 lines
1.7 KiB
JavaScript
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
import { app, BrowserWindow, screen } from 'electron';
|
|
import { getCuE2eScenario } from './e2e-scenarios.mjs';
|
|
import { createCuE2eFixture } from './e2e-fixture.mjs';
|
|
|
|
const scenario = getCuE2eScenario(process.env.MAKA_CU_E2E_SCENARIO ?? 'l0-observe-only');
|
|
|
|
app.setActivationPolicy('accessory');
|
|
app.on('window-all-closed', () => {});
|
|
|
|
let fixture;
|
|
|
|
app.whenReady().then(async () => {
|
|
fixture = await createCuE2eFixture({ BrowserWindow, screen, scenario });
|
|
for (let index = 0; index < 4; index += 1) {
|
|
for (const windowId of fixture.windowIds()) {
|
|
const window = fixture.getWindow(windowId);
|
|
window.showInactive();
|
|
window.moveTop();
|
|
}
|
|
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
}
|
|
process.stdout.write(`CU_FIXTURE_READY ${process.pid}\n`);
|
|
});
|
|
|
|
async function shutdown() {
|
|
fixture?.destroy();
|
|
app.exit(0);
|
|
}
|
|
|
|
process.on('SIGTERM', () => void shutdown());
|
|
process.on('SIGINT', () => void shutdown());
|