File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/test/java/org/jenkinsci/plugins/workflow/cps Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -376,5 +376,18 @@ public void snippetizerLinks() throws Exception {
376376 containsString ("href=\" https://jenkins.io/doc/pipeline/\" " ));
377377 assertThat ("GDSL link is included" , html ,
378378 containsString ("href=\" " + r .contextPath + "/" + job .getUrl () + Snippetizer .ACTION_URL + "/gdsl\" " ));
379+
380+ // Now verify that the links are still present and correct when we're not within a job.
381+ String rootHtml = wc .goTo (Snippetizer .ACTION_URL ).getWebResponse ().getContentAsString ();
382+ assertThat ("Snippet Generator link is included" , rootHtml ,
383+ containsString ("href=\" " + r .contextPath + "/" + Snippetizer .ACTION_URL + "\" " ));
384+ assertThat ("Steps Reference link is included" , rootHtml ,
385+ containsString ("href=\" " + r .contextPath + "/" + Snippetizer .ACTION_URL + "/html\" " ));
386+ assertThat ("Globals Reference link is included" , rootHtml ,
387+ containsString ("href=\" " + r .contextPath + "/" + Snippetizer .ACTION_URL + "/globals\" " ));
388+ assertThat ("Online docs link is included" , rootHtml ,
389+ containsString ("href=\" https://jenkins.io/doc/pipeline/\" " ));
390+ assertThat ("GDSL link is included" , rootHtml ,
391+ containsString ("href=\" " + r .contextPath + "/" + Snippetizer .ACTION_URL + "/gdsl\" " ));
379392 }
380393}
You can’t perform that action at this time.
0 commit comments