@@ -42,20 +42,21 @@ public async Task ShouldConvertHtmlToPdf(string testFileName)
4242
4343 var actualImagePathDirectory = Path . Combine ( Path . GetTempPath ( ) , testFileName ) ;
4444
45- if ( ! IsRunningOnWslOrAzureOrMacos ( ) )
45+ if ( ! IsRunningOnAzureOrMacos ( ) )
4646 {
4747 var actualImages = await Rasterize . ConvertToPngAsync ( actualFilePath , actualImagePathDirectory ) ;
4848 Assert . Single ( actualImages ) ;
49- DocumentAsserter . AssertImageIsEqual ( actualImages . Single ( ) , expectReferenceFilePath , 2000 ) ;
49+ // File.Copy(actualImages.Single(), expectReferenceFilePath, true);
50+ DocumentAsserter . AssertImageIsEqual ( actualImages . Single ( ) , expectReferenceFilePath , 8000 ) ;
5051 }
5152 File . Delete ( actualFilePath ) ;
5253 }
5354 await ChromiumProcessDisposedAsserter . AssertNoChromiumProcessIsRunning ( ) ;
5455 }
5556
5657 [ Theory ]
57- [ InlineData ( "BasicTextFormatedInlineBackground.html" , false , 6000 ) ]
58- [ InlineData ( "BasicTextFormatedInlineBackground.html" , true , 6000 ) ]
58+ [ InlineData ( "BasicTextFormatedInlineBackground.html" , false , 9000 ) ]
59+ [ InlineData ( "BasicTextFormatedInlineBackground.html" , true , 9000 ) ]
5960 public async Task ShouldConvertHtmlToPdfWithOptions ( string testFileName , bool printBackground , int allowedPixelDiff )
6061 {
6162 var sourceHtmlFilePath = $ "../../../TestInput/{ testFileName } ";
@@ -73,7 +74,7 @@ public async Task ShouldConvertHtmlToPdfWithOptions(string testFileName, bool pr
7374
7475 var actualImagePathDirectory = Path . Combine ( Path . GetTempPath ( ) , testFileName ) ;
7576
76- if ( ! IsRunningOnWslOrAzureOrMacos ( ) )
77+ if ( ! IsRunningOnAzureOrMacos ( ) )
7778 {
7879 try
7980 {
@@ -93,7 +94,7 @@ public async Task ShouldConvertHtmlToPdfWithOptions(string testFileName, bool pr
9394 await ChromiumProcessDisposedAsserter . AssertNoChromiumProcessIsRunning ( ) ;
9495 }
9596
96- private static bool IsRunningOnWslOrAzureOrMacos ( )
97+ private static bool IsRunningOnAzureOrMacos ( )
9798 {
9899 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) || RuntimeInformation . IsOSPlatform ( OSPlatform . FreeBSD ) )
99100 {
@@ -107,9 +108,8 @@ private static bool IsRunningOnWslOrAzureOrMacos()
107108
108109 var version = File . ReadAllText ( "/proc/version" ) ;
109110 var IsAzure = version . IndexOf ( "azure" , StringComparison . OrdinalIgnoreCase ) >= 0 ;
110- var IsWsl = version . IndexOf ( "Microsoft" , StringComparison . OrdinalIgnoreCase ) >= 0 ;
111111
112- return IsWsl || IsAzure ;
112+ return IsAzure ;
113113 }
114114
115115 [ Theory ]
@@ -137,7 +137,7 @@ public async Task ShouldConvertHtmlToPng(string testFileName)
137137 }
138138
139139 [ Theory ]
140- [ InlineData ( "BasicTextFormatedInlineBackground.html" , false , 11000 ) ]
140+ [ InlineData ( "BasicTextFormatedInlineBackground.html" , false , 15000 ) ]
141141 [ InlineData ( "BasicTextFormatedInlineBackground.html" , true , 9500 ) ]
142142 public async Task ShouldConvertHtmlToPngScreenshotOptions ( string testFileName , bool omitBackground , int allowedPixelDiff )
143143 {
@@ -158,7 +158,7 @@ public async Task ShouldConvertHtmlToPngScreenshotOptions(string testFileName, b
158158 } ;
159159
160160 await chromiumRenderer . ConvertHtmlToPng ( sourceHtmlFilePath , actualFilePath , screenshotOptions ) ;
161- // File.Copy(actualFilePath, expectReferenceFilePath);
161+ // File.Copy(actualFilePath, expectReferenceFilePath, true );
162162 DocumentAsserter . AssertImageIsEqual ( actualFilePath , expectReferenceFilePath , allowedPixelDiff ) ;
163163 }
164164
0 commit comments