You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -269,12 +270,12 @@ private void validateGridAlignment(List<UIElement> elements, int columns, int ro
269
270
if (columns > 0) {
270
271
interrorLastLine = 0;
271
272
introwCount = 1;
272
-
for (Map.Entry<Integer, AtomicLong> entry : map.entrySet()) {
273
+
for (Map.Entry<Scalar, Integer> entry : map.entrySet()) {
273
274
if (rowCount <= mapSize) {
274
-
intactualInARow = entry.getValue().intValue();
275
+
intactualInARow = entry.getValue();
275
276
if (actualInARow != columns) {
276
277
errorLastLine++;
277
-
if (errorLastLine > 1) {
278
+
if (errorLastLine > 1 || actualInARow > columns) {
278
279
addError(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));
errors.add(String.format("Element #%d has different width. Element width is: [%d, %d]", (i + 1), element.getWidth(), element.getHeight()), element);
325
-
errors.add(String.format("Element #%d has different width. Element width is: [%d, %d]", (i + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
325
+
errors.add(String.format("Element #%d has different width. Element width is: [%s, %s]", (i + 1), element.getWidth(), element.getHeight()), element);
326
+
errors.add(String.format("Element #%d has different width. Element width is: [%s, %s]", (i + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
errors.add(String.format("Element #%d has different height. Element height is: [%d, %d]", (i + 1), element.getWidth(), element.getHeight()), element);
336
-
errors.add(String.format("Element #%d has different height. Element height is: [%d, %d]", (i + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
336
+
errors.add(String.format("Element #%d has different height. Element height is: [%s, %s]", (i + 1), element.getWidth(), element.getHeight()), element);
337
+
errors.add(String.format("Element #%d has different height. Element height is: [%s, %s]", (i + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
errors.add(String.format("Element #%d has different size. Element size is: [%d, %d]", (i + 1), element.getWidth(), element.getHeight()), element);
347
-
errors.add(String.format("Element #%d has different size. Element size is: [%d, %d]", (i + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
347
+
errors.add(String.format("Element #%d has different size. Element size is: [%s, %s]", (i + 1), element.getWidth(), element.getHeight()), element);
348
+
errors.add(String.format("Element #%d has different size. Element size is: [%s, %s]", (i + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
errors.add(String.format("Element #%d has same size. Element size is: [%d, %d]", (firstIndex + 1), element.getWidth(), element.getHeight()), element);
360
-
errors.add(String.format("Element #%d has same size. Element size is: [%d, %d]", (secondIndex + 1), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
360
+
errors.add(String.format("Element #%d has same size. Element size is: [%s, %s]", (firstIndex + 1), element.getWidth(), element.getHeight()), element);
361
+
errors.add(String.format("Element #%d has same size. Element size is: [%s, %s]", (secondIndex + 1), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
errors.add(String.format("Element #%d has same width. Element width is: [%d, %d]", (firstIndex + 1), element.getWidth(), element.getHeight()), element);
373
-
errors.add(String.format("Element #%d has same width. Element width is: [%d, %d]", (secondIndex + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
373
+
errors.add(String.format("Element #%d has same width. Element width is: [%s, %s]", (firstIndex + 1), element.getWidth(), element.getHeight()), element);
374
+
errors.add(String.format("Element #%d has same width. Element width is: [%s, %s]", (secondIndex + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
errors.add(String.format("Element #%d has same height. Element height is: [%d, %d]", (firstIndex + 1), element.getWidth(), element.getHeight()), element);
386
-
errors.add(String.format("Element #%d has same height. Element height is: [%d, %d]", (secondIndex + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
386
+
errors.add(String.format("Element #%d has same height. Element height is: [%s, %s]", (firstIndex + 1), element.getWidth(), element.getHeight()), element);
387
+
errors.add(String.format("Element #%d has same height. Element height is: [%s, %s]", (secondIndex + 2), elementToCompare.getWidth(), elementToCompare.getHeight()), elementToCompare);
0 commit comments