diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 0d4ee0c..e6b8815 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -23,7 +23,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- - uses: actions/setup-node@v3.7.0
+ - uses: actions/setup-node@v3.8.1
with:
node-version: 18
- name: Restore dependencies
diff --git a/Codeuctivity.HtmlRenderer/Codeuctivity.HtmlRenderer.csproj b/Codeuctivity.HtmlRenderer/Codeuctivity.HtmlRenderer.csproj
index 2be0aac..0e9a7a5 100644
--- a/Codeuctivity.HtmlRenderer/Codeuctivity.HtmlRenderer.csproj
+++ b/Codeuctivity.HtmlRenderer/Codeuctivity.HtmlRenderer.csproj
@@ -31,6 +31,8 @@
Codeuctivity.HtmlRenderer
Codeuctivity.HtmlRenderer
true
+ AllEnabledByDefault
+ latest
true
True
Codeuctivity.HtmlRenderer.snk
@@ -39,8 +41,8 @@
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Codeuctivity.HtmlRenderer/Renderer.cs b/Codeuctivity.HtmlRenderer/Renderer.cs
index cc83756..5d757a1 100644
--- a/Codeuctivity.HtmlRenderer/Renderer.cs
+++ b/Codeuctivity.HtmlRenderer/Renderer.cs
@@ -20,7 +20,7 @@ public Renderer(string? customChromiumArgs)
{
if (customChromiumArgs == null)
{
- LaunchOptions = SystemSpecificConfig();
+ LaunchOptions = Renderer.SystemSpecificConfig();
}
else
{
@@ -36,7 +36,7 @@ public Renderer(LaunchOptions? launchOptions = null)
{
if (launchOptions == null)
{
- LaunchOptions = SystemSpecificConfig();
+ LaunchOptions = Renderer.SystemSpecificConfig();
}
else
{
@@ -89,15 +89,26 @@ public static Task CreateAsync(BrowserFetcher browserFetcher, LaunchOp
private async Task InitializeAsync(BrowserFetcher browserFetcher)
{
- BrowserFetcher = browserFetcher;
- BrowserFetcher.DownloadProgressChanged += DownloadProgressChanged;
- var revisionInfo = await BrowserFetcher.DownloadAsync(BrowserFetcher.DefaultChromiumRevision ?? string.Empty).ConfigureAwait(false);
- LaunchOptions.ExecutablePath = revisionInfo.ExecutablePath;
- Browser = await Puppeteer.LaunchAsync(LaunchOptions).ConfigureAwait(false);
+ // for macsome reason the download progress is not called on macos
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ using var browserFetcher1 = new BrowserFetcher();
+ await browserFetcher1.DownloadAsync();
+ Browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true });
+ }
+ else
+ {
+ BrowserFetcher = browserFetcher;
+ BrowserFetcher.DownloadProgressChanged += DownloadProgressChanged;
+ var revisionInfo = await BrowserFetcher.DownloadAsync(PuppeteerSharp.BrowserData.Chrome.DefaultBuildId).ConfigureAwait(false);
+ LaunchOptions.ExecutablePath = revisionInfo.GetExecutablePath();
+ Browser = await Puppeteer.LaunchAsync(LaunchOptions).ConfigureAwait(false);
+ }
+
return this;
}
- private LaunchOptions SystemSpecificConfig()
+ private static LaunchOptions SystemSpecificConfig()
{
if (IsRunningOnWslOrAzure() || IsRunningOnAzureLinux())
{
@@ -126,8 +137,8 @@ private static bool IsRunningOnWslOrAzure()
}
var version = File.ReadAllText("/proc/version");
- var IsWsl = version.IndexOf("Microsoft", StringComparison.OrdinalIgnoreCase) >= 0;
- var IsAzure = version.IndexOf("azure", StringComparison.OrdinalIgnoreCase) >= 0;
+ var IsWsl = version?.IndexOf("Microsoft", StringComparison.OrdinalIgnoreCase) >= 0;
+ var IsAzure = version?.IndexOf("azure", StringComparison.OrdinalIgnoreCase) >= 0;
return IsWsl || IsAzure;
}
@@ -157,10 +168,10 @@ public async Task ConvertHtmlToPdf(string sourceHtmlFilePath, string destination
}
var absolutePath = Path.GetFullPath(sourceHtmlFilePath);
- await using var page = (await Browser.NewPageAsync().ConfigureAwait(false));
+ await using var page = await Browser.NewPageAsync().ConfigureAwait(false);
await page.GoToAsync($"file://{absolutePath}").ConfigureAwait(false);
// Wait for fonts to be loaded. Omitting this might result in no text rendered in PDF.
- await page.EvaluateExpressionHandleAsync("document.fonts.ready");
+ await page.EvaluateExpressionHandleAsync("document.fonts.ready").ConfigureAwait(false);
await page.PdfAsync(destinationPdfFilePath, pdfOptions).ConfigureAwait(false);
}
@@ -188,10 +199,10 @@ public async Task ConvertHtmlToPng(string sourceHtmlFilePath, string destination
}
var absolutePath = Path.GetFullPath(sourceHtmlFilePath);
- await using var page = (await Browser.NewPageAsync().ConfigureAwait(false));
+ await using var page = await Browser.NewPageAsync().ConfigureAwait(false);
await page.GoToAsync($"file://{absolutePath}").ConfigureAwait(false);
// Wait for fonts to be loaded. Omitting this might result in no text the screenshot.
- await page.EvaluateExpressionHandleAsync("document.fonts.ready");
+ await page.EvaluateExpressionHandleAsync("document.fonts.ready").ConfigureAwait(false);
await page.ScreenshotAsync(destinationPngFilePath, screenshotOptions).ConfigureAwait(false);
}
@@ -214,7 +225,7 @@ public async Task ConvertHtmlStringToPngData(string sourceHtmlData, Scre
await using var page = await Browser.NewPageAsync().ConfigureAwait(false);
await page.SetContentAsync(sourceHtmlData).ConfigureAwait(false);
// Wait for fonts to be loaded. Omitting this might result in no text the screenshot.
- await page.EvaluateExpressionHandleAsync("document.fonts.ready");
+ await page.EvaluateExpressionHandleAsync("document.fonts.ready").ConfigureAwait(false);
return await page.ScreenshotDataAsync(screenshotOptions).ConfigureAwait(false);
}
@@ -243,9 +254,7 @@ public async ValueTask DisposeAsync()
await DisposeAsyncCore().ConfigureAwait(false);
Dispose(disposing: false);
-#pragma warning disable CA1816 // Dispose methods should call SuppressFinalize
GC.SuppressFinalize(this);
-#pragma warning restore CA1816 // Dispose methods should call SuppressFinalize
}
///
diff --git a/Codeuctivity.HtmlRendererCli/Codeuctivity.HtmlRendererCli.csproj b/Codeuctivity.HtmlRendererCli/Codeuctivity.HtmlRendererCli.csproj
index 111418d..dd18dd4 100644
--- a/Codeuctivity.HtmlRendererCli/Codeuctivity.HtmlRendererCli.csproj
+++ b/Codeuctivity.HtmlRendererCli/Codeuctivity.HtmlRendererCli.csproj
@@ -4,6 +4,8 @@
Exe
net6.0
true
+ AllEnabledByDefault
+ latest
Codeuctivity.HtmlRendererCli
true
embedded
diff --git a/Codeuctivity.HtmlRendererCli/Program.cs b/Codeuctivity.HtmlRendererCli/Program.cs
index 186364a..af2d8ff 100644
--- a/Codeuctivity.HtmlRendererCli/Program.cs
+++ b/Codeuctivity.HtmlRendererCli/Program.cs
@@ -7,7 +7,7 @@
namespace Codeuctivity.HtmlRendererCli
{
- public class Program
+ public static class Program
{
public static readonly Assembly Reference = typeof(Renderer).Assembly;
public static readonly Version Version = Reference.GetName().Version;
@@ -15,18 +15,18 @@ public class Program
public static async Task Main(string[] args)
{
- if (args.Length != 2)
+ if (args?.Length != 2)
{
Console.WriteLine("Usage: PuppeteerSharp.RendererCli ");
return 1;
}
- var inputPathDocx = args[0];
+ var inputPathDocX = args[0];
var outputPathHtml = args[1];
- if (!File.Exists(inputPathDocx))
+ if (!File.Exists(inputPathDocX))
{
- Console.WriteLine($"Could not find source {inputPathDocx}.");
+ Console.WriteLine($"Could not find source {inputPathDocX}.");
return 1;
}
@@ -36,14 +36,12 @@ public static async Task Main(string[] args)
return 1;
}
- Console.WriteLine($"Converting {inputPathDocx} to {outputPathHtml} using PuppeteerSharp.Renderer {Version}");
- BrowserFetcherOptions options = new BrowserFetcherOptions();
- options.Path = Path.GetTempPath();
- var browserFetcher = new BrowserFetcher(options);
- Console.WriteLine($"Fetching chromium from web, to {browserFetcher.DownloadsFolder} .... ");
+ Console.WriteLine($"Converting {inputPathDocX} to {outputPathHtml} using PuppeteerSharp.Renderer {Version}");
+ using var browserFetcher = new BrowserFetcher();
+ Console.WriteLine($"Fetching chromium from web, to {browserFetcher.CacheDir} .... ");
browserFetcher.DownloadProgressChanged += BrowserFetcher_DownloadProgressChanged;
- await using var chromiumRenderer = await Renderer.CreateAsync(browserFetcher, string.Empty);
- await chromiumRenderer.ConvertHtmlToPdf(inputPathDocx, outputPathHtml);
+ await using var chromiumRenderer = await Renderer.CreateAsync(browserFetcher);
+ await chromiumRenderer.ConvertHtmlToPdf(inputPathDocX, outputPathHtml);
return 0;
}
diff --git a/Codeuctivity.HtmlRendererCliTests/Codeuctivity.HtmlRendererCliTests.csproj b/Codeuctivity.HtmlRendererCliTests/Codeuctivity.HtmlRendererCliTests.csproj
index 7b34c5a..69f3607 100644
--- a/Codeuctivity.HtmlRendererCliTests/Codeuctivity.HtmlRendererCliTests.csproj
+++ b/Codeuctivity.HtmlRendererCliTests/Codeuctivity.HtmlRendererCliTests.csproj
@@ -7,13 +7,13 @@
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Codeuctivity.HtmlRendererCliTests/FactRunableOnWindowsAttribute.cs b/Codeuctivity.HtmlRendererCliTests/FactRunableOnWindowsAttribute.cs
index 94182dd..fa82906 100644
--- a/Codeuctivity.HtmlRendererCliTests/FactRunableOnWindowsAttribute.cs
+++ b/Codeuctivity.HtmlRendererCliTests/FactRunableOnWindowsAttribute.cs
@@ -3,9 +3,9 @@
namespace Codeuctivity.HtmlRendererCliTests
{
- internal class FactRunableOnWindowsAttribute : FactAttribute
+ internal class FactRunnableOnWindowsAttribute : FactAttribute
{
- public FactRunableOnWindowsAttribute()
+ public FactRunnableOnWindowsAttribute()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
diff --git a/Codeuctivity.HtmlRendererCliTests/RendererCliTests.cs b/Codeuctivity.HtmlRendererCliTests/RendererCliTests.cs
index c8be10f..38283e0 100644
--- a/Codeuctivity.HtmlRendererCliTests/RendererCliTests.cs
+++ b/Codeuctivity.HtmlRendererCliTests/RendererCliTests.cs
@@ -19,7 +19,7 @@ public void VersionShouldBeProcessed()
[Fact]
public async Task ConversionShouldWork()
{
- var testFileName = "BasicTextFormated.html";
+ var testFileName = "BasicTextFormatted.html";
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
var actualFilePath = Path.Combine(Path.GetTempPath(), $"Actual{testFileName}.pdf");
@@ -28,10 +28,10 @@ public async Task ConversionShouldWork()
Assert.True(File.Exists(actualFilePath));
}
- [FactRunableOnWindows]
+ [FactRunnableOnWindows]
public void PublishedSelfContainedBinaryShouldWork()
{
- var testFileName = "BasicTextFormated.html";
+ var testFileName = "BasicTextFormatted.html";
var sourceHtmlFilePath = Path.GetFullPath($"../../../TestInput/{testFileName}");
var actualFilePath = Path.Combine(Path.GetTempPath(), $"Actual{testFileName}.pdf");
@@ -40,13 +40,13 @@ public void PublishedSelfContainedBinaryShouldWork()
File.Delete(actualFilePath);
}
- var acutualWindowsBinary = DotnetPublishFolderProfileWindows("Codeuctivity.HtmlRendererCli");
+ var actualWindowsBinary = DotnetPublishFolderProfileWindows("Codeuctivity.HtmlRendererCli");
using var process = new Process
{
StartInfo = new ProcessStartInfo
{
- FileName = acutualWindowsBinary,
+ FileName = actualWindowsBinary,
Arguments = $" {sourceHtmlFilePath} {actualFilePath}",
RedirectStandardOutput = true,
RedirectStandardError = true,
diff --git a/Codeuctivity.HtmlRendererCliTests/TestInput/BasicTextFormated.html b/Codeuctivity.HtmlRendererCliTests/TestInput/BasicTextFormatted.html
similarity index 100%
rename from Codeuctivity.HtmlRendererCliTests/TestInput/BasicTextFormated.html
rename to Codeuctivity.HtmlRendererCliTests/TestInput/BasicTextFormatted.html
diff --git a/Codeuctivity.HtmlRendererTests/Codeuctivity.HtmlRendererTests.csproj b/Codeuctivity.HtmlRendererTests/Codeuctivity.HtmlRendererTests.csproj
index e8f2288..5498951 100644
--- a/Codeuctivity.HtmlRendererTests/Codeuctivity.HtmlRendererTests.csproj
+++ b/Codeuctivity.HtmlRendererTests/Codeuctivity.HtmlRendererTests.csproj
@@ -1,36 +1,36 @@
-
- net7.0;net6.0
- false
- 9.0
- enable
- false
- true
-
+
+ net7.0;net6.0
+ false
+ 9.0
+ enable
+ false
+ true
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
-
-
-
+
+
+
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormated.html.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatted.html.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormated.html.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatted.html.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormated.html.png.diff.linux.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatted.html.png.diff.linux.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormated.html.png.diff.linux.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatted.html.png.diff.linux.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormated.html.png.diff.win.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatted.html.png.diff.win.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormated.html.png.diff.win.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatted.html.png.diff.win.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatedInlineBackground.html.False.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormattedInlineBackground.html.False.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatedInlineBackground.html.False.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormattedInlineBackground.html.False.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatedInlineBackground.html.True.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormattedInlineBackground.html.True.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormatedInlineBackground.html.True.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedConvertHtmlToPngBasicTextFormattedInlineBackground.html.True.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatedInlineBackground.html.True.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatedInlineBackground.html.True.png
deleted file mode 100644
index 92e3da2..0000000
Binary files a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatedInlineBackground.html.True.png and /dev/null differ
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormated.html.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatted.html.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormated.html.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatted.html.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormated.html.png.diff.linux.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatted.html.png.diff.linux.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormated.html.png.diff.linux.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatted.html.png.diff.linux.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormated.html.png.diff.win.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatted.html.png.diff.win.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormated.html.png.diff.win.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatted.html.png.diff.win.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatedInlineBackground.html.False.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormattedInlineBackground.html.False.png
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormatedInlineBackground.html.False.png
rename to Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormattedInlineBackground.html.False.png
diff --git a/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormattedInlineBackground.html.True.png b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormattedInlineBackground.html.True.png
new file mode 100644
index 0000000..ee8ad3d
Binary files /dev/null and b/Codeuctivity.HtmlRendererTests/ExpectedTestOutcome/ExpectedFromHtmlConvertHtmlToPdfBasicTextFormattedInlineBackground.html.True.png differ
diff --git a/Codeuctivity.HtmlRendererTests/Infrastructure/DocumentAsserter.cs b/Codeuctivity.HtmlRendererTests/Infrastructure/DocumentAsserter.cs
index c80f8d3..b403d52 100644
--- a/Codeuctivity.HtmlRendererTests/Infrastructure/DocumentAsserter.cs
+++ b/Codeuctivity.HtmlRendererTests/Infrastructure/DocumentAsserter.cs
@@ -71,7 +71,9 @@ private static void CopyToTestOutput(string testOutputFile)
}
if (!Directory.Exists(TestOutputFirectory))
+ {
Directory.CreateDirectory(TestOutputFirectory);
+ }
File.Copy(testOutputFile, Path.Combine(TestOutputFirectory, Path.GetFileName(testOutputFile)), true);
}
diff --git a/Codeuctivity.HtmlRendererTests/RendererTests.cs b/Codeuctivity.HtmlRendererTests/RendererTests.cs
index ec50f9f..451264e 100644
--- a/Codeuctivity.HtmlRendererTests/RendererTests.cs
+++ b/Codeuctivity.HtmlRendererTests/RendererTests.cs
@@ -24,7 +24,7 @@ public RendererTests()
public Rasterizer Rasterize { get; private set; }
[Theory]
- [InlineData("BasicTextFormated.html")]
+ [InlineData("BasicTextFormatted.html")]
public async Task ShouldConvertHtmlToPdf(string testFileName)
{
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
@@ -55,8 +55,8 @@ public async Task ShouldConvertHtmlToPdf(string testFileName)
}
[Theory]
- [InlineData("BasicTextFormatedInlineBackground.html", false, 9000)]
- [InlineData("BasicTextFormatedInlineBackground.html", true, 9000)]
+ [InlineData("BasicTextFormattedInlineBackground.html", false, 9000)]
+ [InlineData("BasicTextFormattedInlineBackground.html", true, 9000)]
public async Task ShouldConvertHtmlToPdfWithOptions(string testFileName, bool printBackground, int allowedPixelDiff)
{
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
@@ -113,7 +113,7 @@ private static bool IsRunningOnAzureOrMacos()
}
[Theory]
- [InlineData("BasicTextFormated.html")]
+ [InlineData("BasicTextFormatted.html")]
public async Task ShouldConvertHtmlToPng(string testFileName)
{
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
@@ -137,8 +137,8 @@ public async Task ShouldConvertHtmlToPng(string testFileName)
}
[Theory]
- [InlineData("BasicTextFormatedInlineBackground.html", false, 15000)]
- [InlineData("BasicTextFormatedInlineBackground.html", true, 9500)]
+ [InlineData("BasicTextFormattedInlineBackground.html", false, 15000)]
+ [InlineData("BasicTextFormattedInlineBackground.html", true, 9500)]
public async Task ShouldConvertHtmlToPngScreenshotOptions(string testFileName, bool omitBackground, int allowedPixelDiff)
{
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
@@ -167,8 +167,8 @@ public async Task ShouldConvertHtmlToPngScreenshotOptions(string testFileName, b
}
[Theory]
- [InlineData("BasicTextFormatedInlineBackground.html", false, 15000)]
- [InlineData("BasicTextFormatedInlineBackground.html", true, 9500)]
+ [InlineData("BasicTextFormattedInlineBackground.html", false, 15000)]
+ [InlineData("BasicTextFormattedInlineBackground.html", true, 9500)]
public async Task ShouldConvertHtmlToPngBufferOptions(string testFileName, bool omitBackground, int allowedPixelDiff)
{
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
@@ -199,7 +199,7 @@ public async Task ShouldConvertHtmlToPngBufferOptions(string testFileName, bool
}
[Fact]
- public async Task ShouldDisposeGracefull()
+ public async Task ShouldDisposeGraceful()
{
var initialChromiumTasks = ChromiumProcessDisposedAsserter.CountChromiumTasks();
@@ -212,7 +212,7 @@ public async Task ShouldDisposeGracefull()
}
[Theory]
- [InlineData("BasicTextFormated.html")]
+ [InlineData("BasicTextFormatted.html")]
public async Task ShouldConvertHtmlToPngNoSandbox(string testFileName)
{
var sourceHtmlFilePath = $"../../../TestInput/{testFileName}";
diff --git a/Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormated.html b/Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormatted.html
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormated.html
rename to Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormatted.html
diff --git a/Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormatedInlineBackground.html b/Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormattedInlineBackground.html
similarity index 100%
rename from Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormatedInlineBackground.html
rename to Codeuctivity.HtmlRendererTests/TestInput/BasicTextFormattedInlineBackground.html