import it.issue.IssueSearchTest;
import it.issue.IssueTrackingTest;
import it.issue.IssueWorkflowTest;
+import it.issue.IssuesPageTest;
import it.issue.NewIssuesMeasureTest;
import it.qualityModel.MaintainabilityMeasureTest;
import it.qualityModel.MaintainabilityRatingMeasureTest;
IssueSearchTest.class,
IssueTrackingTest.class,
IssueWorkflowTest.class,
+ IssuesPageTest.class,
NewIssuesMeasureTest.class,
// debt
MaintainabilityMeasureTest.class,
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package it.issue;
+
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.selenium.Selenese;
+import it.Category2Suite;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import util.QaOnly;
+import util.selenium.SeleneseTest;
+
+@Category(QaOnly.class)
+public class IssuesPageTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = Category2Suite.ORCHESTRATOR;
+
+ @Test
+ public void save_new_issue_filter() throws Exception {
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("save_new_issue_filter",
+ "/issue/IssuesPageTest/save_new_issue_filter.html"
+ ).build();
+ new SeleneseTest(selenese).runOn(orchestrator);
+ }
+}
--- /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"/>
+ <link rel="selenium.base" href="http://localhost:49506"/>
+ <title>save_new_issue_filter</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">save_new_issue_filter</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/login</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-user-authenticated</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/issues/search</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-facet[data-value="BUG"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.js-facet[data-value="BUG"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-facet.active[data-value="BUG"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.js-filter-save-as</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=input[name="name"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>test</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>super filter</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#save-as-submit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.issues-filters-name</td>
+ <td>*test*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.search-navigator-filters-description</td>
+ <td>*super filter*</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-facet.active[data-value="BUG"]</td>
+ <td></td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
export default Backbone.Model.extend({
url () {
- return window.baseUrl + '/api/issue_filters/show/' + this.id;
+ return window.baseUrl + '/api/issue_filters/show?id=' + this.id;
},
parse (r) {