]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7846 do not display both message and stacktrace
authorStas Vilchik <vilchiks@gmail.com>
Thu, 1 Sep 2016 16:02:07 +0000 (18:02 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 1 Sep 2016 16:02:07 +0000 (18:02 +0200)
it/it-tests/src/test/java/it/projectAdministration/BackgroundTasksTest.java
it/it-tests/src/test/java/pageobjects/BackgroundTaskItem.java
server/sonar-web/src/main/js/apps/background-tasks/views/StacktraceView.hbs

index 46ad5307f855490800bf008d48e11d386704c1d2..0d66bab19a266018909b50ba5c73a9af0555b806 100644 (file)
@@ -71,7 +71,7 @@ public class BackgroundTasksTest {
   }
 
   @Test
-  public void display_error_message_and_stacktrace() {
+  public void display_error_stacktrace() {
     executeBuild("test-project", "Test Project", "2010-01-01");
 
     nav.logIn().submitCredentials("admin", "admin");
@@ -81,7 +81,6 @@ public class BackgroundTasksTest {
     BackgroundTaskItem task = page.getTasksAsItems().get(0);
     task.openActions()
       .openErrorStacktrace()
-      .assertErrorMessageContains("Date of analysis cannot be older than the date of the last known analysis")
       .assertErrorStacktraceContains("Date of analysis cannot be older than the date of the last known analysis");
   }
 
index 75ea69654681719f9ef36da985d2859ba66d87db..cd4bf7f16c003150df4004b4486a1d07d9591c58 100644 (file)
@@ -56,12 +56,7 @@ public class BackgroundTaskItem {
 
   public BackgroundTaskItem openErrorStacktrace () {
     elt.$(".js-task-show-stacktrace").click();
-    $(".js-task-error-message").shouldBe(visible);
-    return this;
-  }
-
-  public BackgroundTaskItem assertErrorMessageContains(String text) {
-    $(".js-task-error-message").should(hasText(text));
+    $(".js-task-stacktrace").shouldBe(visible);
     return this;
   }
 
index 1a4d2eb4753258285f81789850b8c981532e44fc..21ce604acb28f48ed617f49835c4580f872bb9de 100644 (file)
@@ -6,12 +6,12 @@
     <div class="js-modal-messages"></div>
 
     {{#if loaded}}
-      <h4 class="spacer-bottom">{{t 'background_tasks.error_message'}}</h4>
-      <pre class="js-task-error-message">{{task.errorMessage}}</pre>
-
       {{#if stacktrace}}
-        <h4 class="huge-spacer-top spacer-bottom">{{t 'background_tasks.error_stacktrace'}}</h4>
+        <h4 class="spacer-bottom">{{t 'background_tasks.error_stacktrace'}}</h4>
         <pre class="js-task-stacktrace">{{stacktrace}}</pre>
+      {{else}}
+        <h4 class="spacer-bottom">{{t 'background_tasks.error_message'}}</h4>
+        <pre class="js-task-error-message">{{task.errorMessage}}</pre>
       {{/if}}
     {{else}}
       <i class="spinner"></i>