mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove adding minikube, should be auto detected
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
529edc46d8
commit
7efd0b695f
@ -6,7 +6,7 @@
|
||||
*/
|
||||
import { Application } from "spectron";
|
||||
import * as utils from "../helpers/utils";
|
||||
import { addMinikubeCluster, minikubeReady, waitForMinikubeDashboard } from "../helpers/minikube";
|
||||
import { minikubeReady, waitForMinikubeDashboard } from "../helpers/minikube";
|
||||
import { exec } from "child_process";
|
||||
import * as util from "util";
|
||||
|
||||
@ -25,7 +25,6 @@ describe("Lens cluster pages", () => {
|
||||
let clusterAdded = false;
|
||||
const addCluster = async () => {
|
||||
await app.client.waitUntilTextExists("div", "Catalog");
|
||||
await addMinikubeCluster(app);
|
||||
await waitForMinikubeDashboard(app);
|
||||
await app.client.click('a[href="/nodes"]');
|
||||
await app.client.waitUntilTextExists("div.TableCell", "Ready");
|
||||
|
||||
@ -38,28 +38,12 @@ export function minikubeReady(testNamespace: string): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export async function addMinikubeCluster(app: Application) {
|
||||
await app.client.waitForVisible("button.MuiSpeedDial-fab");
|
||||
await app.client.moveToObject("button.MuiSpeedDial-fab");
|
||||
await app.client.waitForVisible(`button[title="Add from kubeconfig"]`);
|
||||
await app.client.click(`button[title="Add from kubeconfig"]`);
|
||||
await app.client.waitUntilTextExists("div", "Select kubeconfig file");
|
||||
await app.client.click("div.Select__control"); // show the context drop-down list
|
||||
await app.client.waitUntilTextExists("div", "minikube");
|
||||
|
||||
if (!await app.client.$("button.primary").isEnabled()) {
|
||||
await app.client.click("div.minikube"); // select minikube context
|
||||
} // else the only context, which must be 'minikube', is automatically selected
|
||||
await app.client.click("div.Select__control"); // hide the context drop-down list (it might be obscuring the Add cluster(s) button)
|
||||
await app.client.click("button.primary"); // add minikube cluster
|
||||
export async function waitForMinikubeDashboard(app: Application) {
|
||||
await app.client.waitUntilTextExists("div.TableCell", "minikube");
|
||||
await app.client.waitForExist(".Input.SearchInput input");
|
||||
await app.client.setValue(".Input.SearchInput input", "minikube");
|
||||
await app.client.waitUntilTextExists("div.TableCell", "minikube");
|
||||
await app.client.click("div.TableRow");
|
||||
}
|
||||
|
||||
export async function waitForMinikubeDashboard(app: Application) {
|
||||
await app.client.waitUntilTextExists("pre.kube-auth-out", "Authentication proxy started");
|
||||
await app.client.waitForExist(`iframe[name="minikube"]`);
|
||||
await app.client.frame("minikube");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user