Skip to content

Commit

Permalink
Revert "Add “Generate a Playbook” Button to Side Panel (#1692)"
Browse files Browse the repository at this point in the history
This reverts commit 03a51f4.
  • Loading branch information
manstis authored Dec 9, 2024
1 parent 03a51f4 commit 878a5e2
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 276 deletions.
10 changes: 0 additions & 10 deletions src/features/lightspeed/utils/explorerView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ export function getWebviewContentWithActiveSession(
"style.css",
]);
const nonce = getNonce();
const generateForm = `<div class="button-container">
<form id="playbook-generation-form">
<vscode-button id="lightspeed-explorer-playbook-generation-submit" class="lightspeedExplorerButton">Generate a playbook</vscode-button>
<script type="module" nonce="${nonce}" src="${webviewUri}"></script>
</form>
</div>`;
const explainForm = `<div class="button-container">
<form id="playbook-explanation-form">
<vscode-button id="lightspeed-explorer-playbook-explanation-submit" class="lightspeedExplorerButton" ${
Expand Down Expand Up @@ -103,7 +97,6 @@ export function getWebviewContentWithActiveSession(
<body>
<div id="lightspeedExplorerView">
${content}
${generateForm}
${explainForm}
</div>
</body>
Expand All @@ -127,9 +120,6 @@ export function setWebviewMessageListener(
case "connect":
commands.executeCommand("ansible.lightspeed.oauth");
return;
case "generate":
commands.executeCommand("ansible.lightspeed.playbookGeneration");
return;
case "explain":
commands.executeCommand("ansible.lightspeed.playbookExplanation");
return;
Expand Down
8 changes: 0 additions & 8 deletions src/webview/apps/lightspeed/explorer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ function setListener(id: string, func: any) {

function main() {
setListener("lightspeed-explorer-connect", lightspeedConnect);
setListener(
"lightspeed-explorer-playbook-generation-submit",
lightspeedExplorerPlaybookGeneration,
);
setListener(
"lightspeed-explorer-playbook-explanation-submit",
lightspeedExplorerPlaybookExplanation,
Expand All @@ -33,10 +29,6 @@ function lightspeedConnect() {
vscode.postMessage({ command: "connect" });
}

function lightspeedExplorerPlaybookGeneration() {
vscode.postMessage({ command: "generate" });
}

function lightspeedExplorerPlaybookExplanation() {
vscode.postMessage({ command: "explain" });
}
12 changes: 0 additions & 12 deletions test/ui-test/lightspeedOneClickTrialUITest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ViewControl,
ViewSection,
VSBrowser,
until,
WebElement,
WebView,
WebviewView,
Expand All @@ -31,12 +30,6 @@ import axios from "axios";
const trialNotificationMessage =
"Ansible Lightspeed is not configured for your organization, click here to start a 90-day trial.";

before(function () {
if (process.platform !== "darwin") {
this.skip();
}
});

describe("Test One Click Trial feature", () => {
let workbench: Workbench;
let explorerView: WebviewView;
Expand Down Expand Up @@ -265,11 +258,6 @@ describe("Test One Click Trial feature", () => {
await tab.select();
await tab.sendKeys(Key.CONTROL, "z", "z", "z", Key.NULL);
await editorView.closeAllEditors();

// The undo's don't seem to (always) work.. So discard changes
const dialog = new ModalDialog();
await dialog.pushButton(`Don't Save`);
await dialog.getDriver().wait(until.stalenessOf(dialog), 2000);
});

it("Sign out using Accounts global action", async () => {
Expand Down
240 changes: 0 additions & 240 deletions test/ui-test/lightspeedUiTestExplorerTest.ts

This file was deleted.

2 changes: 0 additions & 2 deletions test/ui-test/lightspeedUiTestPlaybookGenTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Workbench,
VSBrowser,
EditorView,
until,
WebView,
ModalDialog,
} from "vscode-extension-tester";
Expand Down Expand Up @@ -145,7 +144,6 @@ describe("Verify playbook generation features work as expected", function () {
await workbenchExecuteCommand("View: Close All Editor Groups");
const dialog = new ModalDialog();
await dialog.pushButton(`Don't Save`);
await dialog.getDriver().wait(until.stalenessOf(dialog), 2000);

/* verify generated events */
const expected = [
Expand Down
2 changes: 0 additions & 2 deletions test/ui-test/lightspeedUiTestPlaybookGenWebviewPart2Test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Workbench,
VSBrowser,
EditorView,
until,
WebView,
ModalDialog,
} from "vscode-extension-tester";
Expand Down Expand Up @@ -174,7 +173,6 @@ describe("Verify playbook generation features work as expected", function () {
await workbenchExecuteCommand("View: Close All Editor Groups");
const dialog = new ModalDialog();
await dialog.pushButton(`Don't Save`);
await dialog.getDriver().wait(until.stalenessOf(dialog), 2000);

/* verify generated events */
const expected = [
Expand Down
2 changes: 0 additions & 2 deletions test/ui-test/walkthroughUiTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
EditorView,
ModalDialog,
SettingsEditor,
until,
Workbench,
} from "vscode-extension-tester";
import { updateSettings, sleep } from "./uiTestHelper";
Expand Down Expand Up @@ -99,6 +98,5 @@ describe("Check walkthroughs, elements and associated commands", async () => {
await workbench.executeCommand("View: Close All Editor Groups");
const dialogBox = new ModalDialog();
await dialogBox.pushButton(`Don't Save`);
await dialogBox.getDriver().wait(until.stalenessOf(dialogBox), 2000);
});
});

0 comments on commit 878a5e2

Please sign in to comment.