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