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

Added test plan for TypeSpec extension #5552

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

xiaohua899
Copy link

@xiaohua899 xiaohua899 commented Jan 9, 2025

fix #5444
Description

Added four test scenarios test plan to TypeSpec Extension:

  • create-typespec-project-test-plan.md
  • generate-from-typespec-test-plan.md
  • import-typespec-from-openapi3-test-plan.md
  • typespec-extension-basic-features-test-plan.md

@RodgeFu and @msyyc for notification.

@microsoft-github-policy-service microsoft-github-policy-service bot added the ide Issues for VS, VSCode, Monaco, etc. label Jan 9, 2025
@xiaohua899 xiaohua899 force-pushed the patch-1 branch 2 times, most recently from deb90af to f01671f Compare January 9, 2025 11:29
Create image

Add files via upload

Update create-typespec-project-test-plan.md

Create generate-client-code-from-typespec-test-plan.md

Add files via upload

Update generate-client-code-from-typespec-test-plan.md

Create generate-openapi3-from-typespec-test-plan.md

Add files via upload

Update generate-openapi3-from-typespec-test-plan.md

Update generate-openapi3-from-typespec-test-plan.md

Create generate-server-stub-from-typespec-test-plan.md

Add files via upload

Update generate-server-stub-from-typespec-test-plan.md

Add files via upload

Create import-typespec-from-openapi3-test-plan.md
Update generate-server-stub-from-typespec-test-plan.md

Update create-typespec-project-test-plan.md

Create typespec-extension-basic-features-test-plan.md

Add files via upload

Update typespec-extension-basic-features-test-plan.md

Update typespec-extension-basic-features-test-plan.md

Add files via upload

Update create-typespec-project-test-plan.md

Update generate-client-code-from-typespec-test-plan.md

Update generate-openapi3-from-typespec-test-plan.md

Add files via upload

Update generate-server-stub-from-typespec-test-plan.md

Update import-typespec-from-openapi3-test-plan.md

Update create-typespec-project-test-plan.md

Update generate-client-code-from-typespec-test-plan.md

Update generate-openapi3-from-typespec-test-plan.md

Add files via upload

Update generate-client-code-from-typespec-test-plan.md

Add files via upload

Update typespec-extension-basic-features-test-plan.md

Update typespec-extension-basic-features-test-plan.md

Update generate-client-code-from-typespec-test-plan.md

Update generate-openapi3-from-typespec-test-plan.md

Update create-typespec-project-test-plan.md

Add files via upload

Update generate-openapi3-from-typespec-test-plan.md
@xiaohua899
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

@markcowl markcowl self-assigned this Jan 9, 2025
@RodgeFu RodgeFu self-assigned this Jan 11, 2025

![alt text](./images/GeneratefromTypeSpec_SelectTypespecProject.png)

### Step 4: Select an Emitter Type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the UI will be a little different after Compiler can provide template for default emitters. Will keep you updated.

@msyyc msyyc added the docs Improvements or additions to documentation label Jan 14, 2025
@xiaohua899
Copy link
Author

@RodgeFu We have updated by your comments, please re-review.


![alt text](./images/CreateTypeSpecProject_TestCase_2_CreateProject.png)
![alt text](./images/CreateTypeSpecProject_TestCase_2_CreateSucceedFolder.png)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i saw there is a red line (error) in the screenshot. I think the newly create project should't have error. Could you help to double check what the error is?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When creating the rest-api-spec repo project, the corresponding dependencies were not installed.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiaohua899 as @RodgeFu said, I think tsp init shall generate package.json for users to install these necessary packages. Here is track issue: #5703.


**Validate:** Whether to automatically pop up a completion prompt to list possible types, attributes, and operations.

- For `.tsp` file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the screenshot shown is normal completion from vscode, not from typespec. please verify the completion from typespec model or operation.

![alt text](./images/TriggerImportTypeSpecfromOpenAPI3.png)

### Step 3: Confirm the project folder where you will place the TypeSpec file converted from the specified OpenAPI3 specification.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will only show when user right click on a file, if user right click on a folder, we won't prompt for selecting folder again.


![alt text](./images/ImportTypeSpecfromOpenAPI3_SpecifyOpenAPI3Specification.png)

### Step 5: Verify that `@typespec/http` and `@typespec/openapi3` are installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only openapi3 is needed and will be prompt if user didn't have it installed. Please check extension from PR #5451 for the latest user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create manual test script for vscode extension
4 participants