File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
PuppeteerSharp.TestServer/wwwroot/input
PuppeteerSharp.Tests/InputTests Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < title > Rotated button test</ title >
5+ </ head >
6+ < body >
7+ < script src ="mouse-helper.js "> </ script >
8+ < button onclick ="clicked(); "> Click target</ button >
9+ < style >
10+ button {
11+ transform : rotateY (180deg );
12+ }
13+ </ style >
14+ < script >
15+ window . result = 'Was not clicked' ;
16+ function clicked ( ) {
17+ result = 'Clicked' ;
18+ }
19+ </ script >
20+ </ body >
21+ </ html >
Original file line number Diff line number Diff line change @@ -395,6 +395,14 @@ await Page.EvaluateExpressionAsync(@"{
395395 Assert . Equal ( "Clicked" , await Page . EvaluateExpressionAsync < string > ( "result" ) ) ;
396396 }
397397
398+ [ Fact ]
399+ public async Task ShouldClickARotatedButton ( )
400+ {
401+ await Page . GoToAsync ( TestConstants . ServerUrl + "/input/rotatedButton.html" ) ;
402+ await Page . ClickAsync ( "button" ) ;
403+ Assert . Equal ( "Clicked" , await Page . EvaluateExpressionAsync < string > ( "result" ) ) ;
404+ }
405+
398406 [ Fact ]
399407 public async Task ShouldSelectTheTextWithMouse ( )
400408 {
Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ private decimal ComputeQuadArea(BoxModelPoint[] quad)
518518 var p2 = quad [ ( i + 1 ) % quad . Length ] ;
519519 area += ( ( p1 . X * p2 . Y ) - ( p2 . X * p1 . Y ) ) / 2 ;
520520 }
521- return area ;
521+ return Math . Abs ( area ) ;
522522 }
523523 }
524524}
You can’t perform that action at this time.
0 commit comments