Skip to content

Commit 4a352fe

Browse files
committed
chore: update Bootstrap tests
1 parent b8204ad commit 4a352fe

8 files changed

+36
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,5 @@ ModelManifest.xml
244244
.vs
245245
.idea
246246

247+
# Verify test files
248+
*.received.txt

src/Renderers/FluentEmail.Bootstrap/FluentEmail.Bootstrap.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
<ItemGroup>
2424
<PackageReference Include="UnDotNet.BootstrapEmail" Version="1.*" />
25-
<PackageReference Include="Verify.NUnit" Version="22.5.0" />
2625
</ItemGroup>
2726

2827
</Project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## This script is related to approval tests that protect developers from unintentional changes to the public API
2+
## If your change does change the API on purpose and you double-checked correctness of the changes you can use this script to change the "approved" state of the API
3+
## Make sure that you run the approval tests before running this script, because the tests generate *.received.txt files.
4+
5+
$ApprovalFiles = ".\";
6+
7+
## Copy new API from .received.txt files to .verified.txt files
8+
## Note that .received.txt files are ignored in git and are not part of the repository
9+
Get-ChildItem -Path $ApprovalFiles -Filter "*received.txt" | ForEach-Object {
10+
$NewName = $_.FullName -replace 'received.txt', 'verified.txt'
11+
Move-Item $_.FullName $NewName -Force
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
## This script is related to approval tests that protect developers from unintentional changes to the public API
3+
## If your change does change the API on purpose and you double-checked correctness of the changes you can use this script to change the "approved" state of the API
4+
## Make sure that you run the approval tests before running this script, because the tests generate *.received.txt files.
5+
6+
find ./ -type f -name "*received.txt" | perl -pe 'print $_; s/received/verified/' | xargs -n2 mv

test/FluentEmail.Bootstrap.Tests/BootstrapTests.CompileBootstrap_Compiles.verified.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
<meta name="x-apple-disable-message-reformatting">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
9+
<meta name="color-scheme" content="light dark">
10+
<meta name="supported-color-schemes" content="light dark">
911

1012
<style type="text/css">body,table,td{font-family:Helvetica,Arial,sans-serif!important}.ExternalClass{width:100%}.ExternalClass,.ExternalClass p,.ExternalClass span,.ExternalClass font,.ExternalClass td,.ExternalClass div{line-height:150%}a{text-decoration:none}*{color:inherit}a[x-apple-data-detectors],u+#body a,#MessageViewBody a{color:inherit;text-decoration:none;font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit}img{-ms-interpolation-mode:bicubic}table:not([class^=s-]){font-family:Helvetica,Arial,sans-serif;mso-table-lspace:0;mso-table-rspace:0;border-spacing:0;border-collapse:collapse}table:not([class^=s-]) td{border-spacing:0;border-collapse:collapse}@media screen and (max-width:600px){*[class*=s-lg-]>tbody>tr>td{font-size:0!important;line-height:0!important;height:0!important}}</style>
1113
</head>
12-
<body class="bg-light" style="margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f7fafc">
13-
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f7fafc">
14+
<body class="bg-light" style="Margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f3f4f6">
15+
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="Margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f3f4f6">
1416
<tbody>
1517
<tr>
16-
<td valign="top" style="line-height: 24px;font-size: 16px;margin: 0;background-color: #f7fafc" align="left">
18+
<td valign="top" style="line-height: 24px;font-size: 16px;margin: 0;background-color: #f3f4f6" align="left">
1719
Hi LUKE here is a list 123
1820
</td>
1921
</tr>

test/FluentEmail.Bootstrap.Tests/BootstrapTests.UsingBootstrapBody_Compiles.verified.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
<meta name="x-apple-disable-message-reformatting">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
9+
<meta name="color-scheme" content="light dark">
10+
<meta name="supported-color-schemes" content="light dark">
911

1012
<style type="text/css">body,table,td{font-family:Helvetica,Arial,sans-serif!important}.ExternalClass{width:100%}.ExternalClass,.ExternalClass p,.ExternalClass span,.ExternalClass font,.ExternalClass td,.ExternalClass div{line-height:150%}a{text-decoration:none}*{color:inherit}a[x-apple-data-detectors],u+#body a,#MessageViewBody a{color:inherit;text-decoration:none;font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit}img{-ms-interpolation-mode:bicubic}table:not([class^=s-]){font-family:Helvetica,Arial,sans-serif;mso-table-lspace:0;mso-table-rspace:0;border-spacing:0;border-collapse:collapse}table:not([class^=s-]) td{border-spacing:0;border-collapse:collapse}@media screen and (max-width:600px){*[class*=s-lg-]>tbody>tr>td{font-size:0!important;line-height:0!important;height:0!important}}</style>
1113
</head>
12-
<body class="bg-light" style="margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f7fafc">
13-
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f7fafc">
14+
<body class="bg-light" style="Margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f3f4f6">
15+
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="Margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f3f4f6">
1416
<tbody>
1517
<tr>
16-
<td valign="top" style="line-height: 24px;font-size: 16px;margin: 0;background-color: #f7fafc" align="left">
18+
<td valign="top" style="line-height: 24px;font-size: 16px;margin: 0;background-color: #f3f4f6" align="left">
1719
This is simple text, no templating
1820
</td>
1921
</tr>

test/FluentEmail.Bootstrap.Tests/BootstrapTests.UsingBootstrapTemplate_Compiles.verified.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
<meta name="x-apple-disable-message-reformatting">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
9+
<meta name="color-scheme" content="light dark">
10+
<meta name="supported-color-schemes" content="light dark">
911

1012
<style type="text/css">body,table,td{font-family:Helvetica,Arial,sans-serif!important}.ExternalClass{width:100%}.ExternalClass,.ExternalClass p,.ExternalClass span,.ExternalClass font,.ExternalClass td,.ExternalClass div{line-height:150%}a{text-decoration:none}*{color:inherit}a[x-apple-data-detectors],u+#body a,#MessageViewBody a{color:inherit;text-decoration:none;font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit}img{-ms-interpolation-mode:bicubic}table:not([class^=s-]){font-family:Helvetica,Arial,sans-serif;mso-table-lspace:0;mso-table-rspace:0;border-spacing:0;border-collapse:collapse}table:not([class^=s-]) td{border-spacing:0;border-collapse:collapse}@media screen and (max-width:600px){*[class*=s-lg-]>tbody>tr>td{font-size:0!important;line-height:0!important;height:0!important}}</style>
1113
</head>
12-
<body class="bg-light" style="margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f7fafc">
13-
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f7fafc">
14+
<body class="bg-light" style="Margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f3f4f6">
15+
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="Margin: 0;padding: 0;border: 0;outline: 0;width: 100%;min-width: 100%;height: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;font-family: Helvetica, Arial, sans-serif;line-height: 24px;font-weight: normal;font-size: 16px;box-sizing: border-box;color: #000000;background-color: #f3f4f6">
1416
<tbody>
1517
<tr>
16-
<td valign="top" style="line-height: 24px;font-size: 16px;margin: 0;background-color: #f7fafc" align="left">
18+
<td valign="top" style="line-height: 24px;font-size: 16px;margin: 0;background-color: #f3f4f6" align="left">
1719
Hi LUKE here is a list 123
1820
</td>
1921
</tr>

test/FluentEmail.Bootstrap.Tests/FluentEmail.Bootstrap.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0" />
1818
<PackageReference Update="NUnit3TestAdapter" Version="4.5.0" />
1919
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.8.0" />
20+
<PackageReference Include="Verify.NUnit" Version="22.5.0" />
2021
</ItemGroup>
2122

2223
</Project>

0 commit comments

Comments
 (0)