Skip to content

Commit

Permalink
Update BehaviorUIKitShowcaseTests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinE committed Apr 30, 2024
1 parent 940a52d commit dd8c6e5
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Atata.Cli.HtmlValidate;
using Lombiq.Tests.UI.Extensions;
using Lombiq.UIKit.Tests.UI.Extensions;
using Shouldly;
Expand All @@ -19,17 +20,22 @@ public BehaviorUIKitShowcaseTests(ITestOutputHelper testOutputHelper)
public Task UIKitShowcasePageShouldBeCorrect()
=> ExecuteTestAfterSetupAsync(
context => context.TestUIKitShowcaseBehaviorAsync(),
configuration => configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync =
configuration =>
{
configuration.HtmlValidationConfiguration.HtmlValidationOptions.OutputFormatter =
HtmlValidateFormatter.Names.Json;
configuration.HtmlValidationConfiguration.AssertHtmlValidationResultAsync =
validationResult =>
{
// Error filtering due to https://github.com/OrchardCMS/OrchardCore/issues/15222,
// can be removed once it is resolved.
var errors = validationResult.GetParsedErrors()
.Where(error =>
error.RuleId is not "prefer-native-element" and
not "text-content" and
not "no-redundant-role");
not "text-content" and
not "no-redundant-role");
errors.ShouldBeEmpty(string.Join('\n', errors.Select(error => error.Message)));
return Task.CompletedTask;
});
};
});
}

0 comments on commit dd8c6e5

Please sign in to comment.