Skip to content

Commit d316280

Browse files
author
Denys Zaiats
committed
[1.4.2-fix-grid-validation] - fix for analyzing of grid alignment
1 parent 19bd2b4 commit d316280

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/util/validator/ResponsiveUIValidator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,16 @@ void validateGridAlignment(int columns, int rows) {
328328
}
329329

330330
if (columns > 0) {
331+
int errorLastLine = 0;
331332
int rowCount = 1;
332333
for (Map.Entry<Integer, AtomicLong> entry : map.entrySet()) {
333334
if (rowCount <= mapSize) {
334335
int actualInARow = entry.getValue().intValue();
335336
if (actualInARow != columns) {
336-
putJsonDetailsWithoutElement(String.format("Elements in a grid are not aligned properly in row #%d. Expected %d elements in a row. Actually it's %d", rowCount, columns, actualInARow));
337+
errorLastLine ++;
338+
if (errorLastLine > 1) {
339+
putJsonDetailsWithoutElement(String.format("Elements in a grid are not aligned properly in row #%d. Expected %d elements in a row. Actually it's %d", rowCount, columns, actualInARow));
340+
}
337341
}
338342
rowCount++;
339343
}

0 commit comments

Comments
 (0)