diff --git a/ui/app/templates/application.hbs b/ui/app/templates/application.hbs
index fdade0d70..cfa4247bf 100644
--- a/ui/app/templates/application.hbs
+++ b/ui/app/templates/application.hbs
@@ -31,8 +31,8 @@
{{/if}}
- {{#link-to "jobs" class="button is-white"}}Go to Jobs{{/link-to}}
- {{#link-to "clients" class="button is-white"}}Go to Clients{{/link-to}}
+ {{#link-to "jobs" data-test-error-jobs-link class="button is-white"}}Go to Jobs{{/link-to}}
+ {{#link-to "clients" data-test-error-clients-link class="button is-white"}}Go to Clients{{/link-to}}
{{/unless}}
diff --git a/ui/tests/acceptance/application-errors-test.js b/ui/tests/acceptance/application-errors-test.js
index b07dbdd63..266375c52 100644
--- a/ui/tests/acceptance/application-errors-test.js
+++ b/ui/tests/acceptance/application-errors-test.js
@@ -67,3 +67,28 @@ test('the no leader error state gets its own error message', function(assert) {
);
});
});
+
+test('error pages include links to the jobs and clients pages', function(assert) {
+ visit('/a/non-existent/page');
+
+ andThen(() => {
+ assert.ok(JobsList.error.isPresent, 'An error is shown');
+ JobsList.error.gotoJobs();
+ });
+
+ andThen(() => {
+ assert.equal(currentURL(), '/jobs', 'Now on the jobs page');
+ assert.notOk(JobsList.error.isPresent, 'The error is gone now');
+ visit('/a/non-existent/page');
+ });
+
+ andThen(() => {
+ assert.ok(JobsList.error.isPresent, 'An error is shown');
+ JobsList.error.gotoClients();
+ });
+
+ andThen(() => {
+ assert.equal(currentURL(), '/clients', 'Now on the clients page');
+ assert.notOk(JobsList.error.isPresent, 'The error is gone now');
+ });
+});
diff --git a/ui/tests/pages/jobs/list.js b/ui/tests/pages/jobs/list.js
index 37ebd6746..24aff62f2 100644
--- a/ui/tests/pages/jobs/list.js
+++ b/ui/tests/pages/jobs/list.js
@@ -44,6 +44,8 @@ export default create({
title: text('[data-test-error-title]'),
message: text('[data-test-error-message]'),
seekHelp: clickable('[data-test-error-message] a'),
+ gotoJobs: clickable('[data-test-error-jobs-link]'),
+ gotoClients: clickable('[data-test-error-clients-link]'),
},
namespaceSwitcher: {