Browse Source

SONAR-7846 do not display both message and stacktrace

tags/6.1-RC1
Stas Vilchik 7 years ago
parent
commit
a5a4a49e0c

+ 1
- 2
it/it-tests/src/test/java/it/projectAdministration/BackgroundTasksTest.java View 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");
}


+ 1
- 6
it/it-tests/src/test/java/pageobjects/BackgroundTaskItem.java View 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;
}


+ 4
- 4
server/sonar-web/src/main/js/apps/background-tasks/views/StacktraceView.hbs View 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>

Loading…
Cancel
Save