diff:ignorechildren test occassionally failing #794
buzzbonner
started this conversation in
General
Replies: 1 comment
-
This issue can be closed after finding a problem with the component implementation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I'm using bunit and noticed a test is failing once every few days. Seems like diff:ignorechildren is being ignored? Please see the test and result below:-
--
TEST
// Arrange / Act
using var navMenuComponent = RenderComponent();
var buttonElement = navMenuComponent.Find("button");
buttonElement.Click();
// Assert
var divElement = navMenuComponent.Find("div");
divElement.MarkupMatches(@"<div diff:ignoreChildren class=""sidebar expand"">");
--
A total of 1 test files matched the specified pattern.
[2022-07-08T06:56:52.952Z] Failed Expand_Navigation_Menu_When_Toggled_Once [109 ms]
[2022-07-08T06:56:52.952Z] Error Message:
[2022-07-08T06:56:52.952Z] Test method VMF.UI.Component.Tests.Components.NavMenuTest.Expand_Navigation_Menu_When_Toggled_Once threw exception:
[2022-07-08T06:56:52.952Z] Bunit.HtmlEqualException: HTML comparison failed.
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z] The following errors were found:
[2022-07-08T06:56:52.952Z] 1: The values of the attributes at div(0)[class] are different.
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z] Actual HTML:
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z]
[2022-07-08T06:56:52.952Z] Expected HTML:
[2022-07-08T06:56:52.952Z]
Beta Was this translation helpful? Give feedback.
All reactions