Validate grid width bounds and qualify Archiver window and document states in IntelliJ
This commit is contained in:
@@ -284,6 +284,28 @@ public final class MediaLayoutGridTargetProbe {
|
||||
var cols = (List<?>) get(setup, "columns");
|
||||
var order = new ArrayList<String>();
|
||||
for (var col : cols) order.add((String) get(col, "id"));
|
||||
var labels =
|
||||
grid.lookupAll(".label").stream().map(Label.class::cast).map(Label::getText).toList();
|
||||
require(
|
||||
labels.containsAll(List.of("Musterrechnung.pdf", "Lieferbrief.txt")),
|
||||
"Example rows: " + labels);
|
||||
var widthType =
|
||||
Class.forName("de.neitzel.grid.ColumnWidth", true, grid.getClass().getClassLoader());
|
||||
var resize = grid.getClass().getMethod("setColumnWidth", String.class, widthType);
|
||||
var explicit =
|
||||
Class.forName(widthType.getName() + "$Explicit", true, widthType.getClassLoader())
|
||||
.getConstructor(double.class);
|
||||
var defaultWidth = get(cols.getFirst(), "width");
|
||||
require(
|
||||
order.getFirst().equals("path")
|
||||
&& defaultWidth.getClass().getSimpleName().equals("Default"),
|
||||
"Initial path column");
|
||||
require(
|
||||
resize.invoke(grid, "path", defaultWidth).equals(230d)
|
||||
&& resize.invoke(grid, "path", explicit.newInstance(50d)).equals(150d)
|
||||
&& resize.invoke(grid, "path", explicit.newInstance(600d)).equals(300d)
|
||||
&& resize.invoke(grid, "path", defaultWidth).equals(230d),
|
||||
"Rendered path column width limits");
|
||||
require(order.get(1).equals("folder"), "Column position");
|
||||
Collections.swap(order, 0, 1);
|
||||
try {
|
||||
@@ -344,7 +366,8 @@ public final class MediaLayoutGridTargetProbe {
|
||||
: "Missing definition migration"),
|
||||
"Wrong setup restore " + error);
|
||||
}
|
||||
return "Setup archiver-pruefung/2 · fremde ID und alte Version abgewiesen · folder fest an"
|
||||
return "path start 230 px, resize to 50/600 clamped to 150/300 px, reset 230 px · Setup"
|
||||
+ " archiver-pruefung/2 · fremde ID und alte Version abgewiesen · folder fest an"
|
||||
+ " Index 1 · Posteingang sichtbar, Gruppenschlüssel Post";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user