Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update to open a sample view #12943

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions packages/tests/src/ui-test/treeview/treeview-invalidname.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from "../../utils/vscodeOperation";
import { it } from "../../utils/it";
import * as os from "os";
import { RetryHandler } from "../../utils/retryHandler";

describe("New project Tests", function () {
this.timeout(Timeout.testCase);
Expand Down Expand Up @@ -47,10 +48,12 @@ describe("New project Tests", function () {
},
async function () {
const driver = VSBrowser.instance.driver;
await execCommandIfExist(
CommandPaletteCommands.CreateProjectCommand,
Timeout.webView
);
await RetryHandler.retry(async () => {
await execCommandIfExist(
CommandPaletteCommands.CreateProjectCommand,
Timeout.webView
);
});
const input = await InputBox.create();
// if exist click it
await input.selectQuickPick(CreateProjectQuestion.Tab);
Expand Down
11 changes: 7 additions & 4 deletions packages/tests/src/ui-test/treeview/treeview-samples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { cleanUpLocalProject } from "../../utils/cleanHelper";
import { it } from "../../utils/it";
import { assert } from "chai";
import { join } from "path";
import { RetryHandler } from "../../utils/retryHandler";

describe("Create sample project and open sample view to download sample Tests", function () {
this.timeout(Timeout.testCase);
Expand Down Expand Up @@ -59,10 +60,12 @@ describe("Create sample project and open sample view to download sample Tests",
console.log("close editor tab");
await new EditorView().closeAllEditors();
console.log("open new sample tab from tree view");
await execCommandIfExist(
CommandPaletteCommands.SamplesCommand,
Timeout.webView
);
await RetryHandler.retry(async () => {
await execCommandIfExist(
CommandPaletteCommands.SamplesCommand,
Timeout.webView
);
});
const webView = new WebView();
console.log("find title");
await driver.sleep(Timeout.webView);
Expand Down
4 changes: 2 additions & 2 deletions packages/tests/src/utils/vscodeOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,15 @@ export async function createNewProject(
}
case "addin": {
await input.selectQuickPick(CreateProjectQuestion.OfficeAddin);
await input.selectQuickPick("Taskpane");
await input.selectQuickPick("Task pane");
await driver.sleep(Timeout.input);
break;
}
case "importaddin": {
const importPath: string =
testRootFolder + "\\..\\src\\ui-test\\treeview\\office-xml-addin";
await input.selectQuickPick(CreateProjectQuestion.OfficeAddin);
await input.selectQuickPick("Import an Existing Outlook Add-in");
await input.selectQuickPick("Import an Existing Outlook Add-ins");

console.log("choose import path: ", importPath);
await input.selectQuickPick("Browse...");
Expand Down
Loading