aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-08-24 09:23:21 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-08-25 16:01:06 +0200
commit7d034a6d0d9991c251757eb9ab72bd37ac97b6ab (patch)
tree170ba041b744a95f4bc0377fa27dbb15a8567c6c /tests/src
parentf56a05f14fe4b0685bce7a8750c929641ebf0b78 (diff)
downloadsonarqube-7d034a6d0d9991c251757eb9ab72bd37ac97b6ab.tar.gz
sonarqube-7d034a6d0d9991c251757eb9ab72bd37ac97b6ab.zip
SONAR-9747 Make components and global settings independant from each others in the ui
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java b/tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java
index 0cd466e725b..8e1a210c12c 100644
--- a/tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java
@@ -21,6 +21,7 @@ package org.sonarqube.tests.projectAdministration;
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.build.SonarScanner;
+import org.openqa.selenium.By;
import org.sonarqube.pageobjects.ProjectsManagementPage;
import org.sonarqube.tests.Category1Suite;
import java.io.UnsupportedEncodingException;
@@ -47,6 +48,7 @@ import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
import org.sonarqube.ws.client.permission.UsersWsRequest;
+import static com.codeborne.selenide.Selenide.$;
import static org.apache.commons.lang.time.DateUtils.addDays;
import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.getComponent;
@@ -193,6 +195,22 @@ public class ProjectAdministrationTest {
}
@Test
+ public void display_correct_global_setting () throws UnsupportedEncodingException {
+ scanSample(null, null);
+ SettingsPage page = nav.logIn().submitCredentials(adminUser).openSettings("sample")
+ .openCategory("Analysis Scope")
+ .assertSettingDisplayed("sonar.coverage.exclusions")
+ .setStringValue("sonar.coverage.exclusions", "foo")
+ .assertStringSettingValue("sonar.coverage.exclusions", "foo");
+
+ $(".global-navbar-menu ").$(By.linkText("Administration")).click();
+ page
+ .openCategory("Analysis Scope")
+ .assertSettingDisplayed("sonar.coverage.exclusions")
+ .assertStringSettingValue("sonar.coverage.exclusions", "");
+ }
+
+ @Test
public void display_module_settings() throws UnsupportedEncodingException {
orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));