Skip to content

Commit

Permalink
fix for dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Oct 14, 2023
1 parent 77a9dea commit cba6b0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions finder/dotnet/AppiumFlutterFinder/FlutterBy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public static FlutterBy ByAnscestor(FlutterBy of,
=> new FlutterBy(new
{
finderType = "Ancestor",
matchRoot,
firstMatchOnly,
matchRoot = matchRoot.ToString().ToLower(),
firstMatchOnly = firstMatchOnly.ToString().ToLower(),
of = of.JsonSearchCriteria,
matching = matching.JsonSearchCriteria,
});
Expand All @@ -84,13 +84,12 @@ public static FlutterBy ByDescendant(FlutterBy of,
=> new FlutterBy(new
{
finderType = "Descendant",
matchRoot,
firstMatchOnly,
matchRoot = matchRoot.ToString().ToLower(),
firstMatchOnly = firstMatchOnly.ToString().ToLower(),
of = of.JsonSearchCriteria,
matching = matching.JsonSearchCriteria,
});


}
}

4 changes: 2 additions & 2 deletions finder/dotnet/AppiumFlutterFinderTests/FlutterFinderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void TestByAncestor()
FlutterBy.PageBack()),
firstMatchOnly: true
));
Assert.AreEqual("eyJmaW5kZXJUeXBlIjoiQW5jZXN0b3IiLCJtYXRjaFJvb3QiOmZhbHNlLCJmaXJzdE1hdGNoT25seSI6dHJ1ZSwib2YiOiJ7XCJmaW5kZXJUeXBlXCI6XCJBbmNlc3RvclwiLFwibWF0Y2hSb290XCI6ZmFsc2UsXCJmaXJzdE1hdGNoT25seVwiOmZhbHNlLFwib2ZcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIixcIm1hdGNoaW5nXCI6XCJ7XFxcImZpbmRlclR5cGVcXFwiOlxcXCJQYWdlQmFja1xcXCJ9XCJ9IiwibWF0Y2hpbmciOiJ7XCJmaW5kZXJUeXBlXCI6XCJBbmNlc3RvclwiLFwibWF0Y2hSb290XCI6ZmFsc2UsXCJmaXJzdE1hdGNoT25seVwiOmZhbHNlLFwib2ZcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIixcIm1hdGNoaW5nXCI6XCJ7XFxcImZpbmRlclR5cGVcXFwiOlxcXCJQYWdlQmFja1xcXCJ9XCJ9In0=", element.Id);
Assert.AreEqual("eyJmaW5kZXJUeXBlIjoiQW5jZXN0b3IiLCJtYXRjaFJvb3QiOiJmYWxzZSIsImZpcnN0TWF0Y2hPbmx5IjoidHJ1ZSIsIm9mIjoie1wiZmluZGVyVHlwZVwiOlwiQW5jZXN0b3JcIixcIm1hdGNoUm9vdFwiOlwiZmFsc2VcIixcImZpcnN0TWF0Y2hPbmx5XCI6XCJmYWxzZVwiLFwib2ZcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIixcIm1hdGNoaW5nXCI6XCJ7XFxcImZpbmRlclR5cGVcXFwiOlxcXCJQYWdlQmFja1xcXCJ9XCJ9IiwibWF0Y2hpbmciOiJ7XCJmaW5kZXJUeXBlXCI6XCJBbmNlc3RvclwiLFwibWF0Y2hSb290XCI6XCJmYWxzZVwiLFwiZmlyc3RNYXRjaE9ubHlcIjpcImZhbHNlXCIsXCJvZlwiOlwie1xcXCJmaW5kZXJUeXBlXFxcIjpcXFwiUGFnZUJhY2tcXFwifVwiLFwibWF0Y2hpbmdcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIn0ifQ==", element.Id);
}

[Test]
Expand All @@ -28,7 +28,7 @@ public void TestBydescendant()
FlutterBy.ByDescendant(FlutterBy.PageBack(),
FlutterBy.PageBack())
));
Assert.AreEqual("eyJmaW5kZXJUeXBlIjoiRGVzY2VuZGFudCIsIm1hdGNoUm9vdCI6ZmFsc2UsImZpcnN0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