mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Remove mac-ca usage since it was only in tests (#6043) * Make injecting CAs injectable, remove mac-ca as dependency * Fix win-ca failing on electron renderer on windows * Fix the matcher under features/ for main Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors from new types Signed-off-by: Sebastian Malton <sebastian@malton.name> * Temp change to see windows errors on CI Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix temp change Signed-off-by: Sebastian Malton <sebastian@malton.name> * Change error message for windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * Increase maxBuffer size when reading windows CAs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Switch back to running integration tests on windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix usage after rebase Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update lock file Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
68 lines
2.1 KiB
TypeScript
68 lines
2.1 KiB
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
/*
|
|
Cluster tests are run if there is a pre-existing minikube cluster. Before running cluster tests the TEST_NAMESPACE
|
|
namespace is removed, if it exists, from the minikube cluster. Resources are created as part of the cluster tests in the
|
|
TEST_NAMESPACE namespace. This is done to minimize destructive impact of the cluster tests on an existing minikube
|
|
cluster and vice versa.
|
|
*/
|
|
import type { ElectronApplication, Page } from "playwright";
|
|
import * as utils from "../helpers/utils";
|
|
|
|
describe("preferences page tests", () => {
|
|
let window: Page;
|
|
let cleanup: undefined | (() => Promise<void>);
|
|
|
|
beforeEach(async () => {
|
|
let app: ElectronApplication;
|
|
|
|
({ window, cleanup, app } = await utils.start());
|
|
await utils.clickWelcomeButton(window);
|
|
|
|
await app.evaluate(async ({ app }) => {
|
|
await app.applicationMenu
|
|
?.getMenuItemById(process.platform === "darwin" ? "mac" : "file")
|
|
?.submenu
|
|
?.getMenuItemById("navigate-to-preferences")
|
|
?.click();
|
|
});
|
|
}, 10*60*1000);
|
|
|
|
afterEach(async () => {
|
|
await cleanup?.();
|
|
}, 10*60*1000);
|
|
|
|
it('shows "preferences" and can navigate through the tabs', async () => {
|
|
const pages = [
|
|
{
|
|
id: "app",
|
|
header: "Application",
|
|
},
|
|
{
|
|
id: "proxy",
|
|
header: "Proxy",
|
|
},
|
|
{
|
|
id: "kubernetes",
|
|
header: "Kubernetes",
|
|
},
|
|
];
|
|
|
|
for (const { id, header } of pages) {
|
|
await window.click(`[data-preference-tab-link-test=${id}]`);
|
|
await window.waitForSelector(`[data-preference-page-title-test] >> text=${header}`);
|
|
}
|
|
}, 10*60*1000);
|
|
|
|
// Skipping, but will turn it on again in the follow up PR
|
|
it.skip("ensures helm repos", async () => {
|
|
await window.click("[data-testid=kubernetes-tab]");
|
|
await window.waitForSelector("[data-testid=repository-name]");
|
|
await window.click("#HelmRepoSelect");
|
|
await window.waitForSelector("div.Select__option");
|
|
}, 10*60*1000);
|
|
});
|