mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[chore] bypass udate properly + tweak first test
This commit is contained in:
@@ -18,30 +18,27 @@ export async function startApp(): Promise<StartAppResponse> {
|
||||
const appInfo = parseElectronApp(latestBuild);
|
||||
const electronApp = await electron.launch({
|
||||
args: [appInfo.main],
|
||||
env: {
|
||||
...process.env,
|
||||
E2E_BUILD: "true",
|
||||
},
|
||||
executablePath: appInfo.executable,
|
||||
recordVideo: {
|
||||
dir: getRecordingPath(appInfo.platform),
|
||||
size: {
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
width: 1200,
|
||||
height: 800,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await electronApp.firstWindow();
|
||||
|
||||
// wait for auto-updater to pass
|
||||
let appWindow: Page;
|
||||
while (!appWindow) {
|
||||
appWindow = getMainWindow(electronApp.windows());
|
||||
await pause(500);
|
||||
}
|
||||
const appWindow = await electronApp.firstWindow();
|
||||
|
||||
if (!appWindow) {
|
||||
throw new Error('Unable to get main window');
|
||||
}
|
||||
|
||||
await pause(4000);
|
||||
await pause(3000);
|
||||
|
||||
appWindow.on('console', log.info);
|
||||
appWindow.screenshot({path: path.join(TEST_OUTPUT_DIR, "initial-screen.png")});
|
||||
|
||||
@@ -37,7 +37,7 @@ test('should be able to select then unselect a bs version', async () => {
|
||||
expect(await addVersionPanel.downloadVersionButton.isVisible()).toBeTruthy();
|
||||
|
||||
await addVersionPanel.clickVersion(versionManifest); // deselect version 0.12.2
|
||||
await pause(2000);
|
||||
await pause(3000);
|
||||
|
||||
expect(await addVersionPanel.downloadVersionButton.isVisible()).toBeFalsy();
|
||||
|
||||
|
||||
+3
-2
@@ -22,6 +22,7 @@ import { IpcRequest } from "shared/models/ipc";
|
||||
import { LivShortcut } from "./services/liv/liv-shortcut.service";
|
||||
|
||||
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
|
||||
const isE2E = process.env.E2E_BUILD === "true";
|
||||
|
||||
log.transports.file.level = "info";
|
||||
log.transports.file.resolvePath = () => {
|
||||
@@ -53,7 +54,7 @@ const installExtensions = async () => {
|
||||
.catch(log.error);
|
||||
};
|
||||
|
||||
const createWindow = async (window: AppWindow = "index.html") => {
|
||||
const createWindow = async (window: AppWindow) => {
|
||||
if (isDebug) {
|
||||
await installExtensions();
|
||||
}
|
||||
@@ -92,7 +93,7 @@ if (!gotTheLock) {
|
||||
const deepLink = process.argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
|
||||
|
||||
if (!deepLink) {
|
||||
createWindow();
|
||||
createWindow(!isE2E ? "launcher.html" : "index.html");
|
||||
} else {
|
||||
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user