diff --git a/extensions/survey/renderer.tsx b/extensions/survey/renderer.tsx index c740015634..0a8d8a678a 100644 --- a/extensions/survey/renderer.tsx +++ b/extensions/survey/renderer.tsx @@ -8,6 +8,7 @@ export default class SurveyRendererExtension extends LensRendererExtension { appPreferences = [ { title: "In-App Surveys", + showInPreferencesTab: "telemetry", components: { Hint: () => , Input: () => diff --git a/extensions/telemetry/renderer.tsx b/extensions/telemetry/renderer.tsx index d8ba4225df..15fda68ede 100644 --- a/extensions/telemetry/renderer.tsx +++ b/extensions/telemetry/renderer.tsx @@ -8,6 +8,7 @@ export default class TelemetryRendererExtension extends LensRendererExtension { appPreferences = [ { title: "Telemetry & Usage Tracking", + showInPreferencesTab: "telemetry", id: "telemetry-tracking", components: { Hint: () => , diff --git a/integration/__tests__/app.tests.ts b/integration/__tests__/app.tests.ts index cf03bccf7c..518ede0376 100644 --- a/integration/__tests__/app.tests.ts +++ b/integration/__tests__/app.tests.ts @@ -36,7 +36,7 @@ describe("Lens integration tests", () => { it('shows "add cluster"', async () => { await app.electron.ipcRenderer.send("test-menu-item-click", "File", "Add Cluster"); - await app.client.waitUntilTextExists("h2", "Add Cluster"); + await app.client.waitUntilTextExists("h2", "Add Clusters from Kubeconfig"); }); describe("preferences page", () => { @@ -44,7 +44,17 @@ describe("Lens integration tests", () => { const appName: string = process.platform === "darwin" ? "Lens" : "File"; await app.electron.ipcRenderer.send("test-menu-item-click", appName, "Preferences"); - await app.client.waitUntilTextExists("h2", "Preferences"); + await app.client.waitUntilTextExists("[data-testid=application-header]", "APPLICATION"); + }); + + it("shows all tabs and their contents", async () => { + await app.client.click("[data-testid=application-tab]"); + await app.client.click("[data-testid=proxy-tab]"); + await app.client.waitUntilTextExists("[data-testid=proxy-header]", "PROXY"); + await app.client.click("[data-testid=kube-tab]"); + await app.client.waitUntilTextExists("[data-testid=kubernetes-header]", "KUBERNETES"); + await app.client.click("[data-testid=telemetry-tab]"); + await app.client.waitUntilTextExists("[data-testid=telemetry-header]", "TELEMETRY"); }); it("ensures helm repos", async () => { @@ -54,7 +64,8 @@ describe("Lens integration tests", () => { fail("Lens failed to add Bitnami repository"); } - await app.client.waitUntilTextExists("div.repos #message-bitnami", repos[0].name); // wait for the helm-cli to fetch the repo(s) + await app.client.click("[data-testid=kube-tab]"); + await app.client.waitUntilTextExists("div.repos .repoName", repos[0].name); // wait for the helm-cli to fetch the repo(s) await app.client.click("#HelmRepoSelect"); // click the repo select to activate the drop-down await app.client.waitUntilTextExists("div.Select__option", ""); // wait for at least one option to appear (any text) }); diff --git a/integration/helpers/utils.ts b/integration/helpers/utils.ts index cdc277220f..75c9952796 100644 --- a/integration/helpers/utils.ts +++ b/integration/helpers/utils.ts @@ -89,7 +89,7 @@ export async function clickWelcomeNotification(app: Application) { if (itemsText === "0 item") { // welcome notification should be present, dismiss it await app.client.waitUntilTextExists("div.message", "Welcome!"); - await app.client.click("i.Icon.close"); + await app.client.click(".notification i.Icon.close"); } } diff --git a/src/extensions/registries/app-preference-registry.ts b/src/extensions/registries/app-preference-registry.ts index e6b5d93cb2..0bbb537fa5 100644 --- a/src/extensions/registries/app-preference-registry.ts +++ b/src/extensions/registries/app-preference-registry.ts @@ -9,6 +9,7 @@ export interface AppPreferenceComponents { export interface AppPreferenceRegistration { title: string; id?: string; + showInPreferencesTab?: string; components: AppPreferenceComponents; } diff --git a/src/renderer/components/+catalog/catalog.scss b/src/renderer/components/+catalog/catalog.scss index a5bcc985b7..bb0b2a760c 100644 --- a/src/renderer/components/+catalog/catalog.scss +++ b/src/renderer/components/+catalog/catalog.scss @@ -1,6 +1,7 @@ .CatalogPage { --width: 100%; --height: 100%; + text-align: left; .content-wrapper { .content { diff --git a/src/renderer/components/+catalog/catalog.tsx b/src/renderer/components/+catalog/catalog.tsx index bffdf28cfc..9a3f7ab54f 100644 --- a/src/renderer/components/+catalog/catalog.tsx +++ b/src/renderer/components/+catalog/catalog.tsx @@ -103,7 +103,7 @@ export class Catalog extends React.Component { } return ( - +