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

Use new Select dropdown for UI Tests #2123

Merged
merged 8 commits into from
Aug 16, 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
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<QuickPickItem
label="Select..."
detail="(new or existing)"
data-automation="add-deployment-button"
data-automation="select-deployment"
/>
<div
class="select-indicator codicon codicon-chevron-down"
Expand Down
22 changes: 17 additions & 5 deletions test/vscode-ui/test/specs/extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,26 @@ describe("VS Code Extension UI Test", () => {
it("create first deployment", async () => {
await switchToSubframe();
// initialize project via button
const init = await $('[data-automation="add-deployment-button"]');

await expect(init).toHaveText("Add Deployment");
await init.click();
const selectButton = (await $('[data-automation="select-deployment"]')).$(
".quick-pick-label",
);
await expect(selectButton).toHaveText("Select...");
await selectButton.click();

// switch out of iframe
await browser.switchToFrame(null);

// set title
// verify Create New Deployment message displays and select it
const createMessage = await browser.$(".label-name");
await expect(createMessage).toHaveText("Create a New Deployment");
await createMessage.click();

// confirm title is ready and set title
const titleMessage = await browser.$("#quickInput_message");
await titleMessage.waitForExist({ timeout: 5000 });
await expect(titleMessage).toHaveText(
"Enter a title for your content or application. (Press 'Enter' to confirm or 'Escape' to cancel)",
);
await input.setValue("fastapi-test");
await browser.keys("\uE007");

Expand Down