From 15e8bf8e4488adaf74f02fa8fe981378785aa8ec Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 10 Jun 2021 19:47:04 -0400 Subject: [PATCH] Try new timeouts Signed-off-by: Sebastian Malton --- integration/__tests__/app.tests.ts | 2 +- integration/__tests__/cluster-pages.tests.ts | 2 +- integration/__tests__/command-palette.tests.ts | 2 +- integration/helpers/utils.ts | 16 ++++++---------- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/integration/__tests__/app.tests.ts b/integration/__tests__/app.tests.ts index 757a51c1fa..20714da800 100644 --- a/integration/__tests__/app.tests.ts +++ b/integration/__tests__/app.tests.ts @@ -30,7 +30,7 @@ import * as utils from "../helpers/utils"; import { listHelmRepositories } from "../helpers/utils"; import { fail } from "assert"; -jest.setTimeout(5 * 60 * 1000); // 5 minutes so that we can get better errors from spectron +jest.setTimeout(2 * 60 * 1000); // 2 minutes so that we can get better errors from spectron // FIXME (!): improve / simplify all css-selectors + use [data-test-id="some-id"] (already used in some tests below) describe("Lens integration tests", () => { diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index 7b6c609924..39f29df25e 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -33,7 +33,7 @@ import * as util from "util"; export const promiseExec = util.promisify(exec); -jest.setTimeout(5 * 60 * 1000); // 5 minutes so that we can get better errors from spectron +jest.setTimeout(2 * 60 * 1000); // 2 minutes so that we can get better errors from spectron // FIXME (!): improve / simplify all css-selectors + use [data-test-id="some-id"] (already used in some tests below) describe("Lens cluster pages", () => { diff --git a/integration/__tests__/command-palette.tests.ts b/integration/__tests__/command-palette.tests.ts index 01271deecf..2295e69384 100644 --- a/integration/__tests__/command-palette.tests.ts +++ b/integration/__tests__/command-palette.tests.ts @@ -22,7 +22,7 @@ import type { Application } from "spectron"; import * as utils from "../helpers/utils"; -jest.setTimeout(5 * 60 * 1000); // 5 minutes so that we can get better errors from spectron +jest.setTimeout(2 * 60 * 1000); // 2 minutes so that we can get better errors from spectron describe("Lens command palette", () => { let app: Application; diff --git a/integration/helpers/utils.ts b/integration/helpers/utils.ts index 20876520c7..ddd6b8ba8c 100644 --- a/integration/helpers/utils.ts +++ b/integration/helpers/utils.ts @@ -69,8 +69,12 @@ export function describeIf(condition: boolean) { return condition ? describe : describe.skip; } -export function setup(): Application { - return new Application({ +export const keys = { + backspace: "\uE003" +}; + +export async function appStart() { + const app = new Application({ path: AppPaths[process.platform], // path to electron app args: [], startTimeout: 60000, @@ -79,14 +83,6 @@ export function setup(): Application { CICD: "true" } }); -} - -export const keys = { - backspace: "\uE003" -}; - -export async function appStart() { - const app = setup(); await app.start(); // Wait for splash screen to be closed