|
71 | 71 | import java.util.logging.LogRecord; |
72 | 72 | import jenkins.model.Jenkins; |
73 | 73 | import jenkins.model.ProjectNamingStrategy; |
| 74 | +import jenkins.model.experimentalflags.UserExperimentalFlagsProperty; |
74 | 75 | import jenkins.security.NotReallyRoleSensitiveCallable; |
75 | 76 | import org.htmlunit.FailingHttpStatusCodeException; |
76 | 77 | import org.htmlunit.FormEncodingType; |
@@ -137,6 +138,27 @@ void roundTrip() throws Exception { |
137 | 138 | assertTrue(view.isFilterQueue()); |
138 | 139 | } |
139 | 140 |
|
| 141 | + @Issue("JENKINS-76289") |
| 142 | + @Test |
| 143 | + void newDashboardShowsIconSizeControl() throws Exception { |
| 144 | + j.jenkins.setSecurityRealm(j.createDummySecurityRealm()); |
| 145 | + |
| 146 | + User user = User.getOrCreateByIdOrFullName("new-dashboard-user"); |
| 147 | + Map<String, String> flags = new HashMap<>(); |
| 148 | + flags.put("new-dashboard-page.flag", "true"); |
| 149 | + user.addProperty(new UserExperimentalFlagsProperty(flags)); |
| 150 | + |
| 151 | + j.createFreeStyleProject("p"); |
| 152 | + |
| 153 | + WebClient webClient = j.createWebClient().withBasicCredentials(user.getId()); |
| 154 | + HtmlPage page = webClient.goTo("view/all/"); |
| 155 | + |
| 156 | + assertNotNull(page.getFirstByXPath("//div[contains(@class,'app-build-bar')]")); |
| 157 | + assertNotNull(page.getFirstByXPath("//div[contains(@class,'jenkins-icon-size')]")); |
| 158 | + assertNotNull(page.getFirstByXPath("//a[contains(@href,'iconSize?16x16')]")); |
| 159 | + assertNotNull(page.getFirstByXPath("//a[contains(@href,'iconSize?24x24')]")); |
| 160 | + } |
| 161 | + |
140 | 162 | @Issue("JENKINS-7100") |
141 | 163 | @Test |
142 | 164 | void xHudsonHeader() throws Exception { |
|
0 commit comments