Skip to content

Commit

Permalink
Add support to scaffold action plugins in the plugin webview (#1766)
Browse files Browse the repository at this point in the history
* Add support to scaffold action plugins in the plugin webview

* Minor changes in the other webviews for UI enhancements

* Add test for action plugin
  • Loading branch information
shatakshiiii authored Feb 2, 2025
1 parent bb52ca6 commit d783854
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/features/contentCreator/addPluginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class AddPlugin {
<vscode-dropdown id="plugin-dropdown">
<vscode-option>filter</vscode-option>
<vscode-option>lookup</vscode-option>
<vscode-option>action</vscode-option>
</vscode-dropdown>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/features/contentCreator/createDevcontainerPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class CreateDevcontainer {
</vscode-button>
<vscode-button id="open-file-button" form="devcontainer-form" disabled>
<span class="codicon codicon-go-to-file"></span>
&nbsp; Explore Devcontainer
&nbsp; Open Devcontainer
</vscode-button>
</div>
</section>
Expand Down
4 changes: 2 additions & 2 deletions src/features/contentCreator/createSampleExecutionEnvPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class CreateSampleExecutionEnv {
<body>
<div class="title-div">
<h1>Create a sample Ansible Execution Environment file</h1>
<h1>Create a sample Ansible execution environment file</h1>
<p class="subtitle">Streamlining automation</p>
</div>
Expand Down Expand Up @@ -175,7 +175,7 @@ export class CreateSampleExecutionEnv {
</vscode-button>
<vscode-button id="open-file-button" form="init-form" disabled>
<span class="codicon codicon-go-to-file"></span>
&nbsp; Open Execution Environment file
&nbsp; Open Execution environment file
</vscode-button>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/features/quickLinks/quickLinksView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function getWebviewQuickLinks(webview: Webview, extensionUri: Uri) {
<div class="catalogue">
<h3>
<a href="command:ansible.content-creator.create-sample-execution-env-file" title="Create a sample Execution Environment file.">
<span class="codicon codicon-new-file"></span> Execution environment template
<span class="codicon codicon-new-file"></span> Execution environment
<span class="new-badge">NEW</span>
</a>
</h3>
Expand Down
12 changes: 10 additions & 2 deletions test/ui-test/contentCreatorUiTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe("Test Ansible sample execution environment file scaffolding", () => {

it("Check create-sample-execution-env-file webview elements", async () => {
await testWebViewElements(
"Ansible: Create a sample Ansible Execution Environment file",
"Ansible: Create a sample Ansible execution environment file",
"Create Sample Ansible Execution Environment",
);
});
Expand Down Expand Up @@ -300,12 +300,20 @@ describe("Test collection plugins scaffolding", () => {
}
}

it("Check add-plugin webview elements", async () => {
it("Check add-plugin webview elements for lookup plugin", async () => {
await testWebViewElements(
"Ansible: Add a Plugin",
"Add Plugin",
"test_plugin_name",
"lookup",
);
});
it("Check add-plugin webview elements for action plugin", async () => {
await testWebViewElements(
"Ansible: Add a Plugin",
"Add Plugin",
"test_plugin_name",
"action",
);
});
});

0 comments on commit d783854

Please sign in to comment.