You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test-plan.md
+88-32Lines changed: 88 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,9 +94,12 @@ The easist way to verify that a project was successfully loaded is to open a .cs
94
94
* Add a new file and reference a type in it from a different file. Deleting from disk the file containing the referenced type should produce error messages
95
95
96
96
#### ASP.NET Core Razor
97
-
The Razor experience is available when you open a .cshtml file in a valid OmniSharp project. To setup a test project to verify on you can do:
98
-
1.`dotnet new razor`
99
-
2. Open `Pages/Index.cshtml`
97
+
The Razor experience is available when you open a .cshtml file in a valid OmniSharp project.
98
+
99
+
To setup a test project to verify on you can do:
100
+
1. Install the latest preview of the .NET Core 3.0 SDK by going to https://github.com/dotnet/core-sdk and picking the appropriate platform specific installer from the Release/3.0.1XX column. The version should be 3.0.0-preview4-nnnnnn.
101
+
2.`dotnet new webapp`
102
+
3. Open `Pages/Index.cshtml`
100
103
101
104
##### C# Completion
102
105
* Typing `@DateTime.Now` and `@(DateTime.Now)` provides completions throughout typing.
@@ -109,14 +112,26 @@ The Razor experience is available when you open a .cshtml file in a valid OmniSh
109
112
##### C# Diagnostics
110
113
* Typing `@ThisDoesNotExist` results in an error being created and squiggled in the .cshtml file. NOTE: This error squiggly will be misaligned due to known issues.
111
114
115
+
##### TagHelper completion
116
+
Note that the pipe in the below examples indicates the cursor.
117
+
* Typing `<environment>` prompts you with HTML completion for the `environment` tag and on completion commit auto-completes the closing tag.
118
+
* Type `<cache |`, hit ctrl + space, search for `asp-vary-by-user`, commit the completion. Ensure that it auto-completes the attribute to: `<cache asp-vary-by-user`.
119
+
* Type `<form |`, hit ctrl + space, search for `asp-route-...`, commit the completion. Ensure that it auto-completes the attribute to: `<form asp-route-|=""`. Type `foo` and then hit tab. Cursor should be inside of the double quotes: `<form asp-route-foo="|"`.
120
+
121
+
##### Razor Diagnostics
122
+
* Typing `@{ <strong> }` results in errors. One error should be about the "strong" tag missing a closing tag.
123
+
* Fixing the error and typing `</strong>` i.e. `@{ <strong></strong> }` results in the diagnostic going away.
124
+
112
125
##### Known issues:
113
126
- Error squiggles may be misaligned due to known issues.
114
127
115
128
#### Blazor
116
-
The Blazor experience is available when you open a .cshtml file in a valid OmniSharp/Blazor project. To setup a test project to verify on you can do:
117
-
1.`dotnet new -i Microsoft.AspNetCore.Blazor.Templates`
118
-
2.`dotnet new blazor`
119
-
3. Open `Pages/Index.cshtml`
129
+
The Blazor experience is available when you open a .razor file in a valid OmniSharp/Blazor project.
130
+
131
+
To setup a test project to verify on you can do:
132
+
1. Install the latest preview of the .NET Core 3.0 SDK by going to https://github.com/dotnet/core-sdk and picking the appropriate platform specific installer from the Release/3.0.1XX column. The version should be 3.0.0-preview4-nnnnnn.
133
+
2.`dotnet new blazorserverside`
134
+
3. Open `Pages/Index.razor`
120
135
121
136
##### C# Completion
122
137
* Typing `@DateTime.Now` and `@(DateTime.Now)` provides completions throughout typing.
@@ -128,11 +143,31 @@ The Blazor experience is available when you open a .cshtml file in a valid OmniS
128
143
129
144
##### C# Diagnostics
130
145
* When no changes have been performed on `Pages/Index.cshtml`, there are 0 errors.
131
-
* Typing `@ThisDoesNotExist` results in an error being created and squiggled in the .cshtml file.
146
+
* Typing `@ThisDoesNotExist` results in an error being created and squiggled in the .cshtml file.
147
+
148
+
##### Components
149
+
* Typing `<Counter>` prompts you with HTML completion for the `Counter` tag and on completion commit auto-completes the closing tag.
150
+
- In the completion list that pops up ensure there's also a `YourProjectName.Pages.Counter` entry in the HTML completion list.
151
+
* Open `Counter.razor`, in the `@functions { ... }` block add:
152
+
```C#
153
+
[Parameter]
154
+
privateintIncrementAmount { get; set; }
155
+
```
156
+
- Save `Counter.razor` then wait 5 seconds.
157
+
- Go back to `Index.razor` and type `<Counter |`, hit ctrl space, search for `IncrementAmount` attribute, commit the completion. Ensure that it auto-completes to `<Counter IncrementAmount="|"`
158
+
- While inside the `IncrementAmount` attribute type `in`, hit ctrl + space, search for `int`, type `.`, search for `MaxValue` commit it, you should have `<Counter IncrementAmount="int.MaxValue"`
159
+
* Verify `_Imports.razor` works as expected:
160
+
- Add a new Folder `Utilities` under the `/Pages` folder. Within that folder add a `Helper.razor` file.
161
+
- Open the `_Imports.razor` under the `/Pages` folder. Add `@using YourProjectName.Pages.Utilities`
162
+
- Go back to `Index.razor`. Typing `<Helper>` prompts you with HTML completion for the `Helper` tag.
163
+
164
+
165
+
##### Razor Diagnostics
166
+
* Typing `@{ <strong> }` results in errors. One error should be about the "strong" tag missing a closing tag.
167
+
* Fixing the error and typing `</strong>` i.e. `@{ <strong></strong> }` results in the diagnostic going away.
132
168
133
169
##### Known issues:
134
-
- Error squiggles may be misaligned due to known issues.
135
-
- There are some errors in the default Blazor project that are known. All errors that read like `Cannot convert method group 'SomeMethodName' to non-delegate type 'object'. Did you intend to invoke the method? [ProjectName]` are expected.
170
+
- Error squiggles may be misaligned due to known issues.
136
171
137
172
#### Legacy Razor
138
173
The Razor experience is degraded (but no errors) when you open a .cshtml file in a valid OmniSharp/Legacy Razor project. To setup a test project to verify on you can do:
@@ -165,56 +200,60 @@ Verifying Html is needed to ensure the Razor experience is still partially enabl
165
200
166
201
#### Razor Project level Information
167
202
To verify the project level information for Razor do the following:
168
-
1. Verify the `obj/Debug/TheTFMOfTheProject` folder contains a `project.razor.json` file (once the project is restored)
169
-
2. Verify the `project.razor.json`'s `Configuration` section is not set to `null`.
203
+
1. Install the latest preview of the .NET Core 3.0 SDK by going to https://github.com/dotnet/core-sdk and picking the appropriate platform specific installer from the Release/3.0.1XX column. The version should be 3.0.0-preview4-nnnnnn.
204
+
2. Verify the `obj/Debug/TheTFMOfTheProject` folder contains a `project.razor.json` file (once the project is restored)
205
+
3. Verify the `project.razor.json`'s `Configuration` section is not set to `null`.
170
206
171
207
Verify each of the test projects above's `project.razor.json` file (ASP.NET Core Razor, Blazor and Legacy Razor) looks something like the following:
@@ -223,10 +262,27 @@ Verify each of the test projects above's `project.razor.json` file (ASP.NET Core
223
262
"ExtensionName": "UnsupportedRazorExtension"
224
263
}
225
264
]
226
-
}
265
+
},
266
+
"ProjectWorkspaceState": {
267
+
"TagHelpers": [],
268
+
"CSharpLanguageVersion": 703// This may be different
269
+
},
270
+
"RootNamespace": null,
271
+
"Documents": []
227
272
}
228
273
```
229
274
275
+
#### Report a Razor issue
276
+
Perform the following in any of the above Razor projects.
277
+
* Run the `Report a Razor issue` command while `razor.trace` is set to `Off`. Ensure that you get a dialog stating that `razor.trace` must be set to `Verbose`.
278
+
* Run the `Report a Razor issue` command while `razor.trace` is set to `Verbose`. Follow the instructions, type a little bit in a .cshtml file when it's recording. Once you stop the recording ensure that the content copied to your clipboard has the following information:
279
+
- Razor log output under the **Logs** section
280
+
- The Razor document content under the **Workspace information** section
281
+
- Projected CSharp document under the **Workspace information** section
282
+
- Projected Html document under the **Workspace information** section
283
+
-`dotnet --info` output under **Machine information** section
284
+
- The table of extensions under the **Machine information** section
0 commit comments