Skip to content

Commit d8fcde4

Browse files
committed
feat(state): state locators and fragments alphabetical sorting
1 parent a701555 commit d8fcde4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/ru/ewc/checklogic/server/StoredState.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public StoredState(final Map<String, Map<String, Object>> state) {
4949

5050
public String asHtmlList() {
5151
return "<ul>%s</ul>".formatted(this.state.entrySet().stream()
52+
.sorted(Map.Entry.comparingByKey())
5253
.map(
5354
entry -> "<li><h4>%s</h4>%s</li>".formatted(
5455
entry.getKey(),
@@ -61,6 +62,7 @@ public String asHtmlList() {
6162

6263
private static String toInnerList(final Map<String, Object> value) {
6364
return "<ul>%s</ul>".formatted(value.entrySet().stream()
65+
.sorted(Map.Entry.comparingByKey())
6466
.map(entry -> "<li>%s: %s</li>".formatted(entry.getKey(), entry.getValue()))
6567
.collect(Collectors.joining())
6668
);

src/main/java/ru/ewc/checklogic/testing/CheckFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private static TestResult performAndLog(
7777
}
7878
logCheckpoint(ctx, "%s - %s".formatted(rule.header(), CheckFile.desc(failures)));
7979
return new TestResult(
80-
rule.header(),
80+
rule.header().replace("::", " - "),
8181
failures.isEmpty(),
8282
resultAsUnorderedList(failures),
8383
tracker.events()

0 commit comments

Comments
 (0)