1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/integration/__tests__/command-palette.tests.ts
Jari Kolehmainen 1cac3ca74c
Upgrade to Electron 14.2.4 (#4625)
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Jim Ehrismann <jehrismann@mirantis.com>
2022-01-27 10:23:36 -05:00

35 lines
1.1 KiB
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { ElectronApplication, Page } from "playwright";
import * as utils from "../helpers/utils";
import { isWindows } from "../../src/common/vars";
describe("Lens command palette", () => {
let window: Page, cleanup: () => Promise<void>, app: ElectronApplication;
beforeEach(async () => {
({ window, cleanup, app } = await utils.start());
await utils.clickWelcomeButton(window);
}, 10*60*1000);
afterEach(async () => {
await cleanup();
}, 10*60*1000);
describe("menu", () => {
// skip on windows due to suspected playwright issue with Electron 14
utils.itIf(!isWindows)("opens command dialog from menu", async () => {
await app.evaluate(async ({ app }) => {
await app.applicationMenu
.getMenuItemById("view")
.submenu.getMenuItemById("command-palette")
.click();
});
await window.waitForSelector(".Select__option >> text=Hotbar: Switch");
}, 10*60*1000);
});
});