Fix, skip or update tooling tests

Skipped folding range test tracked by #10859
Skipped rename test tracked by #10856
Updated semantic tokens test tracked by #10857
Update folding range tests tracked by #10860
Update spell checking test tracked by #10863
Skipped formatting tests tracked by #10864
Skipped auto insert tests tracked by #10865
This commit is contained in:
David Wengier 2024-09-10 08:26:17 +10:00
Родитель 116950b98a
Коммит f929020b39
9 изменённых файлов: 21 добавлений и 23 удалений

Просмотреть файл

@ -26,7 +26,7 @@ public class CohostDocumentFormattingEndpointTest(ITestOutputHelper testOutputHe
// and provide regression prevention. The tests here are not exhaustive, but they validate the the cohost endpoints
// call into the formatting engine at least, and handles C#, Html and Razor formatting changes correctly.
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10864")]
public Task Formatting()
=> VerifyDocumentFormattingAsync(
input: """

Просмотреть файл

@ -19,7 +19,7 @@ public class CohostDocumentSpellCheckEndpointTest(ITestOutputHelper testOutputHe
public async Task Handle()
{
var input = """
@page [|"this is csharp"|]
@page [|"/this is csharp"|]
<div>[|
@ -37,7 +37,7 @@ public class CohostDocumentSpellCheckEndpointTest(ITestOutputHelper testOutputHe
@([|"unless they contain csharp"|])
</style>
@{ var [|x|] = [|"csharp"|];
@{ var [|x|] = [|"csharp"|]; }
@*[| Eat more chickin. |]*@
@ -52,10 +52,10 @@ public class CohostDocumentSpellCheckEndpointTest(ITestOutputHelper testOutputHe
}
""";
await VerifySemanticTokensAsync(input);
await VerifySpellCheckRangesAsync(input);
}
private async Task VerifySemanticTokensAsync(TestCode input)
private async Task VerifySpellCheckRangesAsync(TestCode input)
{
var document = CreateProjectAndRazorDocument(input.Text);
var sourceText = await document.GetTextAsync(DisposalToken);

Просмотреть файл

@ -27,15 +27,15 @@ public class CohostFoldingRangeEndpointTest(ITestOutputHelper testOutputHelper)
<div>
Hello World
</div>
}|]
</div>
}
|]</div>
@if (true) {[|
<div>
Hello World
</div>
}|]
}
|]
@if (true) {[|
}|]
""");
@ -67,11 +67,11 @@ public class CohostFoldingRangeEndpointTest(ITestOutputHelper testOutputHelper)
Goodbye World
</div>
}|]
}|]
</div>
}
|]</div>
""");
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10859")]
public Task Usings()
=> VerifyFoldingRangesAsync("""
@using System[|

Просмотреть файл

@ -84,7 +84,7 @@ public class CohostOnAutoInsertEndpointTest(ITestOutputHelper testOutputHelper)
delegatedResponseText: "\"$0\"");
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10865")]
public async Task CSharp_OnForwardSlash()
{
await VerifyOnAutoInsertAsync(
@ -120,7 +120,7 @@ public class CohostOnAutoInsertEndpointTest(ITestOutputHelper testOutputHelper)
formatOnType: false);
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10865")]
public async Task CSharp_OnEnter()
{
await VerifyOnAutoInsertAsync(
@ -141,7 +141,7 @@ public class CohostOnAutoInsertEndpointTest(ITestOutputHelper testOutputHelper)
triggerCharacter: "\n");
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10865")]
public async Task CSharp_OnEnter_TwoSpaceIndent()
{
await VerifyOnAutoInsertAsync(
@ -163,7 +163,7 @@ public class CohostOnAutoInsertEndpointTest(ITestOutputHelper testOutputHelper)
tabSize: 2);
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10865")]
public async Task CSharp_OnEnter_UseTabs()
{
const char tab = '\t';

Просмотреть файл

@ -56,7 +56,7 @@ public class CohostOnTypeFormattingEndpointTest(ITestOutputHelper testOutputHelp
triggerCharacter: '\n');
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10864")]
public async Task CSharp()
{
await VerifyOnTypeFormattingAsync(

Просмотреть файл

@ -22,7 +22,7 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost;
[UseExportProvider]
public class CohostRangeFormattingEndpointTest(ITestOutputHelper testOutputHelper) : CohostEndpointTestBase(testOutputHelper)
{
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10864")]
public Task RangeFormatting()
=> VerifyRangeFormattingAsync(
input: """

Просмотреть файл

@ -20,7 +20,7 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost;
public class CohostRenameEndpointTest(ITestOutputHelper testOutputHelper) : CohostEndpointTestBase(testOutputHelper)
{
[Fact]
[Fact(Skip = "https://github.com/dotnet/razor/issues/10856")]
public Task CSharp_Method()
=> VerifyRenamesAsync(
input: """

Просмотреть файл

@ -42,8 +42,7 @@ Line Δ, Char Δ, Length, Type, Modifier(s), Text
1 0 1 razorTransition [] [}]
2 0 1 razorTransition [] [@]
0 1 7 razorDirective [] [section]
0 8 9 local name [] [MySection]
0 10 1 razorTransition [] [{]
0 18 1 razorTransition [] [{]
1 4 1 markupTagDelimiter [] [<]
0 1 3 markupElement [] [div]
0 3 1 markupTagDelimiter [] [>]

Просмотреть файл

@ -48,8 +48,7 @@ Line Δ, Char Δ, Length, Type, Modifier(s), Text
1 0 1 razorTransition [] [}]
2 0 1 razorTransition [] [@]
0 1 7 razorDirective [] [section]
0 8 9 local name [razorCode] [MySection]
0 10 1 razorTransition [] [{]
0 18 1 razorTransition [] [{]
1 4 1 markupTagDelimiter [] [<]
0 1 3 markupElement [] [div]
0 3 1 markupTagDelimiter [] [>]