Skip to content

Commit 3aaef2d

Browse files
datho7561angelozerr
authored andcommitted
Fix test failures caused by diagnostic severity change
Fixes #1057 Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent b64890a commit 3aaef2d

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

qute.ls/com.redhat.qute.ls/src/test/java/com/redhat/qute/services/diagnostics/QuteDiagnosticsInExpressionWithWhenSectionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void switchExpressionTypeMismatchInvalidSection() {
109109
" {/switch}";
110110
testDiagnosticsFor(template, //
111111
d(2, 3, 2, 7, QuteErrorCode.UndefinedSectionTag, "No section helper found for `XXX`.",
112-
DiagnosticSeverity.Error));
112+
DiagnosticSeverity.Warning));
113113
}
114114

115115
@Test
@@ -298,7 +298,7 @@ public void whenExpressionOperatorWhichContainsEquals() {
298298
" {#is <= ON}\r\n" + //
299299
" {/when}";
300300
testDiagnosticsFor(template);
301-
301+
302302
template = "{@org.acme.Machine Machine}\r\n" + //
303303
" {#when Machine.getMachine()}\r\n" + //
304304
" {#is != ON OFF}\r\n" + //
@@ -309,7 +309,7 @@ public void whenExpressionOperatorWhichContainsEquals() {
309309
"Unexpected operand `OFF`. The operator `!=` in the `#is` section expects only one parameter.",
310310
DiagnosticSeverity.Error));
311311
}
312-
312+
313313
@Test
314314
public void whenExpressionOperatorNoParameters() {
315315
String template = "{@org.acme.Machine Machine}\r\n" + //

qute.ls/com.redhat.qute.ls/src/test/java/com/redhat/qute/services/diagnostics/QuteDiagnosticsInUserTagTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void undefinedObjectFollowingByMethodInUserTagTemplate() {
7070
"src/main/resources/templates/tags/user.html", //
7171
"tags/user");
7272
}
73-
73+
7474
@Test
7575
public void undefinedObjectInUserTagCall() {
7676
String template = "{#input name=name /}";
@@ -100,7 +100,7 @@ public void undefinedSectionTag() throws Exception {
100100
String template = "{#undefined /}";
101101

102102
Diagnostic d = d(0, 1, 0, 11, QuteErrorCode.UndefinedSectionTag, "No section helper found for `undefined`.",
103-
DiagnosticSeverity.Error);
103+
DiagnosticSeverity.Warning);
104104
testDiagnosticsFor(template, //
105105
d);
106106

qute.ls/com.redhat.qute.ls/src/test/java/com/redhat/qute/services/diagnostics/project/AbstractQuteDiagnosticsInProjectTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
/**
4141
* Abstract class for testing diagnostics with closed/opened Qute template in a
4242
* given project.
43-
*
43+
*
4444
* @author Angelo ZERR
4545
*
4646
*/
@@ -127,7 +127,7 @@ private void onLoadFilesTest(QuteQuickStartProjectLanguageServer server) throws
127127
DiagnosticSeverity.Error), //
128128
d(1, 3, 1, 9, QuteErrorCode.UndefinedSectionTag, //
129129
"No section helper found for `title`.", //
130-
DiagnosticSeverity.Error));
130+
DiagnosticSeverity.Warning));
131131

132132
// base.html
133133
PublishDiagnosticsParams baseDiagnostics = findPublishDiagnostics(diagnostics, "base.html");
@@ -208,7 +208,7 @@ private void onChangeFile(QuteQuickStartProjectLanguageServer server) throws Exc
208208
DiagnosticSeverity.Error), //
209209
d(1, 3, 1, 9, QuteErrorCode.UndefinedSectionTag, //
210210
"No section helper found for `title`.", //
211-
DiagnosticSeverity.Error));
211+
DiagnosticSeverity.Warning));
212212

213213
// base.html
214214
PublishDiagnosticsParams baseDiagnostics = findPublishDiagnostics(diagnostics, "base.html");

0 commit comments

Comments
 (0)