Offer grid row attributes and qualify Archiver folder profile editing
This commit is contained in:
@@ -16,13 +16,13 @@ import javax.imageio.ImageIO;
|
||||
public final class ImportWorkflowProbe extends FormWorkflowProbe {
|
||||
@Override
|
||||
void verify(Project project) throws Exception {
|
||||
open(project, "ConnectionForm", 2);
|
||||
open(project, "ConnectionForm");
|
||||
discover();
|
||||
target("securityChoices", "view", "security", "items", "COMPATIBLE");
|
||||
target("protocol", "both", "protocol", "value", "COMPATIBLE");
|
||||
target("security", "both", "security", "value", "COMPATIBLE");
|
||||
|
||||
open(project, "FolderTab", 2);
|
||||
open(project, "FolderTab");
|
||||
discover();
|
||||
target("view", "both", "view", "value", "COMPATIBLE");
|
||||
target("grouping", "both", "grouping", "value", "COMPATIBLE");
|
||||
@@ -31,20 +31,20 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
|
||||
target("rows", "view", "clearLayout", "accessibleHelp", "INCOMPATIBLE");
|
||||
target("view", "both", "untypedPick", "value", "UNRESOLVED");
|
||||
target("rows", "view", "grid", "items", "COMPATIBLE");
|
||||
applyAndReopen(project, "FolderTab", 2, "grid", "items", "rows", "view");
|
||||
applyAndReopen(project, "FolderTab", "grid", "items", "rows", "view");
|
||||
preview("archive-folder", "import-grid");
|
||||
|
||||
open(project, "ImportForm", 3);
|
||||
open(project, "ImportForm");
|
||||
discover();
|
||||
target("folder", "both", "folders", "value", "COMPATIBLE");
|
||||
applyAndReopen(project, "ImportForm", 3, "folders", "value", "folder", "both");
|
||||
applyAndReopen(project, "ImportForm", "folders", "value", "folder", "both");
|
||||
preview("import-free", "import-free");
|
||||
preview("import-collision", "import-collision");
|
||||
preview("import-busy", "import-busy");
|
||||
Files.writeString(output.resolve("SUCCESS.txt"), Files.readString(output.resolve("steps.txt")));
|
||||
}
|
||||
|
||||
private void open(Project project, String form, int count) throws Exception {
|
||||
private void open(Project project, String form) throws Exception {
|
||||
var path =
|
||||
Path.of(project.getBasePath(), "src/main/resources/de/neitzel/archiver/ui", form + ".fxml");
|
||||
file = edt(() -> LocalFileSystem.getInstance().refreshAndFindFileByNioFile(path));
|
||||
@@ -52,8 +52,24 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
|
||||
fx(pane::flush).toCompletableFuture().get(10, java.util.concurrent.TimeUnit.SECONDS);
|
||||
click(pane, "Form preview");
|
||||
click(pane, "Build and Refresh");
|
||||
var required =
|
||||
switch (form) {
|
||||
case "FolderTab" -> java.util.List.of("archive-folder", "folder-actions");
|
||||
case "ConnectionForm" -> java.util.List.of("connection-imap", "connection-jmap");
|
||||
case "ImportForm" -> java.util.List.of("import-free", "import-collision", "import-busy");
|
||||
default -> throw new IllegalArgumentException(form);
|
||||
};
|
||||
await(
|
||||
() -> fx(() -> ((ComboBox<?>) pane.lookup("#preview-example")).getItems().size() == count));
|
||||
() ->
|
||||
fx(
|
||||
() ->
|
||||
((ComboBox<?>) pane.lookup("#preview-example"))
|
||||
.getItems().stream()
|
||||
.map(
|
||||
de.neitzel.fxdesigner.workflow.DesignerWorkflow.Example.class::cast)
|
||||
.map(de.neitzel.fxdesigner.workflow.DesignerWorkflow.Example::id)
|
||||
.toList()
|
||||
.containsAll(required)));
|
||||
// The initial native document sync invalidates discovery while the first preview is loading.
|
||||
// Wait for the displayed revision before selecting a source in the inspector.
|
||||
await(
|
||||
@@ -73,7 +89,7 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
|
||||
return ((ImageView) pane.lookup("#full-preview-image")).getImage() != null
|
||||
&& state.contains("revision");
|
||||
}));
|
||||
step("Opened " + form + " with " + count + " examples");
|
||||
step("Opened " + form + " with " + required);
|
||||
}
|
||||
|
||||
private void discover() throws Exception {
|
||||
@@ -161,7 +177,7 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
|
||||
}
|
||||
|
||||
private void applyAndReopen(
|
||||
Project project, String form, int count, String id, String prop, String path, String dir)
|
||||
Project project, String form, String id, String prop, String path, String dir)
|
||||
throws Exception {
|
||||
click(pane, "Use selected target");
|
||||
if (!fx(
|
||||
@@ -188,7 +204,7 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
|
||||
FileEditorManager.getInstance(project).closeFile(file);
|
||||
return null;
|
||||
});
|
||||
open(project, form, count);
|
||||
open(project, form);
|
||||
if (!source().contains(declaration)) throw new AssertionError("Binding was lost on reopen");
|
||||
step("Applied, saved and reopened " + declaration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user