@@ -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"); | |||
} | |||
@@ -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; | |||
} | |||
@@ -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> |