assertThat(searchIssues(new SearchWsRequest().setTypes(singletonList("VULNERABILITY"))).getPaging().getTotal()).isEqualTo(8);
}
+ @Test
+ public void bulk_change() {
+ ORCHESTRATOR.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("bulk_change",
+ "/issue/IssueSearchTest/bulk_change.html"
+ ).build());
+ }
+
private List<org.sonarqube.ws.Issues.Issue> searchByRuleKey(String... ruleKey) throws IOException {
return searchIssues(new SearchWsRequest().setRules(asList(ruleKey))).getIssuesList();
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<tbody>
+<tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/issues</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.js-issue-transition</td>
+ <td>*Open*</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>id=issues-bulk-change</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>id=issues-bulk-change</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=#issues-bulk-change + .dropdown-menu .js-bulk-change</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#issues-bulk-change + .dropdown-menu .js-bulk-change</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>id=bulk-change-form</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>id=transition-confirm</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>id=transition-confirm</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>id=bulk-change-submit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>id=bulk-change-form</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.js-issue-transition</td>
+ <td>*Confirmed*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
const init = function () {
const options = window.sonarqube;
- this.state = new State();
+ this.state = new State({ canBulkChange: !!window.SS.user });
this.list = new Issues();
this.facets = new Facets();