Skip to content

Commit 9502738

Browse files
committed
Fix test
1 parent c28a823 commit 9502738

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/resources/io/jenkins/plugins/designlibrary/Home/index.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<s:card icon="symbol-sparkles-outline plugin-ionicons-api"
6262
title="${%use-with-ai}"
6363
description="${%use-with-ai-description}"
64-
href="${rootURL}/${it.urlName}/llms.txt"
64+
href="llms.txt"
6565
tag="${%New}" />
6666
</div>
6767
</s:section>

src/test/java/ValidRelativeUrlsTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS;
33

44
import io.jenkins.plugins.designlibrary.UISample;
5-
import java.util.ArrayList;
65
import java.util.List;
76
import java.util.stream.Stream;
87
import org.htmlunit.html.DomNode;
@@ -22,6 +21,8 @@ class ValidRelativeUrlsTest {
2221

2322
private List<UISample> samples;
2423

24+
private final List<String> otherUrls = List.of("llms.txt");
25+
2526
@BeforeAll
2627
void beforeAll(JenkinsRule jenkins) {
2728
this.jenkins = jenkins;
@@ -39,8 +40,8 @@ void validRelativeUrls(String url) throws Exception {
3940
webClient.getOptions().setPrintContentOnFailingStatusCode(false);
4041
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
4142

42-
List<String> validUrls =
43-
new ArrayList<>(samples.stream().map(UISample::getUrlName).toList());
43+
List<String> validUrls = Stream.concat(samples.stream().map(UISample::getUrlName), otherUrls.stream())
44+
.toList();
4445

4546
var page = webClient.goTo(url);
4647
var links = page.querySelectorAll(".jdl-section a");

0 commit comments

Comments
 (0)