Skip to content

Commit ddc0278

Browse files
authored
Also search on extension's artifactId (#1330)
1 parent b0cd0dd commit ddc0278

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

base/src/main/resources/web/lib/components/extensions-picker/extensions-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function equalsFilter(e: ExtensionValues, expr: string[], field: string) {
149149
}
150150

151151
function defaultFiltering(filtered: ExtensionValues[], formattedSearch: string) {
152-
return filtered.filter(e => inFilter(e, formattedSearch.split(/\s+/), [ 'name', 'shortname', 'keywords', 'category' ]));
152+
return filtered.filter(e => inFilter(e, formattedSearch.split(/\s+/), [ 'name', 'shortname', 'keywords', 'category', 'artifact-id' ]));
153153
}
154154

155155

base/src/test/java/io/quarkus/code/CodeQuarkusPlaywrightTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ public void testSearchExtensions(TestInfo testInfo) throws Throwable {
111111
.map(e -> e.querySelectorAll(".status-experimental"))
112112
.noneMatch(List::isEmpty)).isTrue();
113113
});
114+
115+
search(page, "quarkus-hibernate-orm", () -> {
116+
final List<ElementHandle> names = page.querySelectorAll(".extension-id");
117+
final List<String> list = names.stream().map(ElementHandle::innerText).toList();
118+
assertThat(list).isNotEmpty().allMatch(s -> s.toLowerCase().contains("quarkus-hibernate-orm"));
119+
});
114120
}
115121

116122
}

0 commit comments

Comments
 (0)