Skip to content

Commit 32bafd7

Browse files
vitali-priText-CI
authored andcommitted
Fix tests after fixing LayoutExceptionMessageConstant.INVALID_CELL_INDEXES exception
DEVSIX-8427 Autoported commit. Original commit hash: [cae4c3d3a]
1 parent 7b71560 commit 32bafd7

File tree

18 files changed

+49
-113
lines changed

18 files changed

+49
-113
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/grid/GridItemPlacementTest.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ You should have received a copy of the GNU Affero General Public License
2222
*/
2323
using System;
2424
using iText.Html2pdf;
25-
using iText.Layout.Exceptions;
2625

2726
namespace iText.Html2pdf.Css.Grid {
2827
[NUnit.Framework.Category("IntegrationTest")]
@@ -85,15 +84,19 @@ public virtual void FewCellsPlacement4Test() {
8584

8685
[NUnit.Framework.Test]
8786
public virtual void FewCellsPlacement5Test() {
88-
Exception e = NUnit.Framework.Assert.Catch(typeof(ArgumentException), () => RunTest("fewCellsPlacement5"));
89-
NUnit.Framework.Assert.AreEqual(LayoutExceptionMessageConstant.INVALID_CELL_INDEXES, e.Message);
87+
RunTest("fewCellsPlacement5");
9088
}
9189

9290
[NUnit.Framework.Test]
9391
public virtual void FewCellsPlacement6Test() {
9492
RunTest("fewCellsPlacement6");
9593
}
9694

95+
[NUnit.Framework.Test]
96+
public virtual void FewCellsPlacement7Test() {
97+
RunTest("fewCellsPlacement7");
98+
}
99+
97100
[NUnit.Framework.Test]
98101
public virtual void RowStartEnd1Test() {
99102
RunTest("rowStartEnd1");

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/grid/GridTemplatesTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ public virtual void MaxHeightFlexRowsTest2() {
626626
RunTest("maxHeightFlexRowsTest2");
627627
}
628628

629+
[NUnit.Framework.Test]
629630
[LogMessage(Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, LogLevel = LogLevelConstants.WARN
630631
)]
631632
public virtual void DivNestingTest() {

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/multicol/ColumnCountTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ public virtual void ConvertBasicDisplayPropertyTest() {
125125
RunTest("basicDisplayPropertyTest");
126126
}
127127

128-
[NUnit.Framework.Ignore("DEVSIX-8427")]
129128
[NUnit.Framework.Test]
130129
public virtual void ConvertBasicDisplayPropertyWithNestedColumnsTest() {
131130
RunTest("basicDisplayPropertyWithNestedColumnsTest");

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/multicol/ColumnWidthTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ public virtual void ConvertNestedElementsTest() {
102102
RunTest("nestedElementsTest");
103103
}
104104

105-
[NUnit.Framework.Ignore("DEVSIX-8427")]
106105
[NUnit.Framework.Test]
107106
public virtual void ConvertBasicDisplayPropertyTest() {
108107
RunTest("basicDisplayPropertyTest");

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css_grid/grid_model/GridFloat002Test.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ You should have received a copy of the GNU Affero General Public License
2727

2828
namespace iText.Html2pdf.Css.W3c.Css_grid.Grid_model {
2929
//TODO DEVSIX-2449 z-index is not supported
30-
//TODO DEVSIX-8427: Fix LayoutExceptionMessageConstant.INVALID_CELL_INDEXES exception
31-
[NUnit.Framework.Ignore("DEVSIX-8427")]
3230
[LogMessage(Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, Count = 3)]
3331
public class GridFloat002Test : W3CCssTest {
3432
protected internal override String GetHtmlFileName() {

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css_multicol/BalanceGridContainerRefTest.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,64 +21,12 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using System.IO;
25-
using iText.Html2pdf;
2624
using iText.Html2pdf.Css.W3c;
27-
using iText.IO.Util;
28-
using iText.Kernel.Utils;
2925

3026
namespace iText.Html2pdf.Css.W3c.Css_multicol {
3127
public class BalanceGridContainerRefTest : W3CCssTest {
32-
private static readonly String baseDestinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory
33-
+ "/test/itext/html2pdf/css/w3c/";
34-
35-
private static readonly String baseSourceFolder = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
36-
.CurrentContext.TestDirectory) + "/resources/itext/html2pdf/css/w3c/";
37-
38-
//after completing DEVSIX-8427, remove everything from this class except for getHtmlFileName() method
3928
protected internal override String GetHtmlFileName() {
4029
return "balance-grid-container-ref.html";
4130
}
42-
43-
[NUnit.Framework.Ignore("DEVSIX-8427")]
44-
[NUnit.Framework.Test]
45-
public override void Test() {
46-
String sourceFolder = GetSourceFolder();
47-
String destinationFolder = GetDestinationFolder();
48-
String htmlFilePath = sourceFolder + GetHtmlFileName();
49-
String outFilePath = destinationFolder + GetOutPdfFileName();
50-
String cmpFilePath = sourceFolder + GetOutPdfFileName();
51-
System.Console.Out.WriteLine("html: " + UrlUtil.GetNormalizedFileUriString(htmlFilePath) + "\n");
52-
HtmlConverter.ConvertToPdf(new FileInfo(htmlFilePath), new FileInfo(outFilePath), GetConverterProperties()
53-
);
54-
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFilePath, cmpFilePath, destinationFolder
55-
, "diff_"));
56-
}
57-
58-
private String GetOutPdfFileName() {
59-
String htmlFileName = GetHtmlFileName();
60-
return iText.Commons.Utils.StringUtil.ReplaceAll(htmlFileName, "\\.[a-zA-Z]+?$", ".pdf");
61-
}
62-
63-
private String GetDestinationFolder() {
64-
String localPackage = GetLocalPackage();
65-
return baseDestinationFolder + localPackage + System.IO.Path.DirectorySeparatorChar + GetTestClassName() +
66-
System.IO.Path.DirectorySeparatorChar;
67-
}
68-
69-
private String GetSourceFolder() {
70-
String localPackage = GetLocalPackage();
71-
return baseSourceFolder + localPackage + System.IO.Path.DirectorySeparatorChar;
72-
}
73-
74-
private String GetLocalPackage() {
75-
String packageName = GetType().Namespace.ToString();
76-
String basePackageName = typeof(W3CCssTest).Namespace.ToString();
77-
return packageName.Substring(basePackageName.Length).Replace('.', System.IO.Path.DirectorySeparatorChar);
78-
}
79-
80-
private String GetTestClassName() {
81-
return GetType().Name;
82-
}
8331
}
8432
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css_multicol/BalanceGridContainerTest.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,64 +21,12 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using System.IO;
25-
using iText.Html2pdf;
2624
using iText.Html2pdf.Css.W3c;
27-
using iText.IO.Util;
28-
using iText.Kernel.Utils;
2925

3026
namespace iText.Html2pdf.Css.W3c.Css_multicol {
3127
public class BalanceGridContainerTest : W3CCssTest {
32-
private static readonly String baseDestinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory
33-
+ "/test/itext/html2pdf/css/w3c/";
34-
35-
private static readonly String baseSourceFolder = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
36-
.CurrentContext.TestDirectory) + "/resources/itext/html2pdf/css/w3c/";
37-
38-
//after completing DEVSIX-8427, remove everything from this class except for getHtmlFileName() method
3928
protected internal override String GetHtmlFileName() {
4029
return "balance-grid-container.html";
4130
}
42-
43-
[NUnit.Framework.Ignore("DEVSIX-8427")]
44-
[NUnit.Framework.Test]
45-
public override void Test() {
46-
String sourceFolder = GetSourceFolder();
47-
String destinationFolder = GetDestinationFolder();
48-
String htmlFilePath = sourceFolder + GetHtmlFileName();
49-
String outFilePath = destinationFolder + GetOutPdfFileName();
50-
String cmpFilePath = sourceFolder + GetOutPdfFileName();
51-
System.Console.Out.WriteLine("html: " + UrlUtil.GetNormalizedFileUriString(htmlFilePath) + "\n");
52-
HtmlConverter.ConvertToPdf(new FileInfo(htmlFilePath), new FileInfo(outFilePath), GetConverterProperties()
53-
);
54-
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFilePath, cmpFilePath, destinationFolder
55-
, "diff_"));
56-
}
57-
58-
private String GetOutPdfFileName() {
59-
String htmlFileName = GetHtmlFileName();
60-
return iText.Commons.Utils.StringUtil.ReplaceAll(htmlFileName, "\\.[a-zA-Z]+?$", ".pdf");
61-
}
62-
63-
private String GetDestinationFolder() {
64-
String localPackage = GetLocalPackage();
65-
return baseDestinationFolder + localPackage + System.IO.Path.DirectorySeparatorChar + GetTestClassName() +
66-
System.IO.Path.DirectorySeparatorChar;
67-
}
68-
69-
private String GetSourceFolder() {
70-
String localPackage = GetLocalPackage();
71-
return baseSourceFolder + localPackage + System.IO.Path.DirectorySeparatorChar;
72-
}
73-
74-
private String GetLocalPackage() {
75-
String packageName = GetType().Namespace.ToString();
76-
String basePackageName = typeof(W3CCssTest).Namespace.ToString();
77-
return packageName.Substring(basePackageName.Length).Replace('.', System.IO.Path.DirectorySeparatorChar);
78-
}
79-
80-
private String GetTestClassName() {
81-
return GetType().Name;
82-
}
8331
}
8432
}

itext.tests/itext.html2pdf.tests/resources/itext/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement5.html

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

1212
.wrapper > div {
1313
border: 2px solid darkblue;
14-
background-color: lightblue;
1514
}
1615

1716
.wrapper > div:nth-of-type(2) {

0 commit comments

Comments
 (0)