diff --git a/ui/app/templates/application.hbs b/ui/app/templates/application.hbs index 56840d820..d7d2f5596 100644 --- a/ui/app/templates/application.hbs +++ b/ui/app/templates/application.hbs @@ -93,6 +93,11 @@ data-test-error-clients-link class="button is-white" >Go to Clients + Go to Sign In {{else}} diff --git a/ui/tests/acceptance/application-errors-test.js b/ui/tests/acceptance/application-errors-test.js index 0bbc8f63c..c6d0041da 100644 --- a/ui/tests/acceptance/application-errors-test.js +++ b/ui/tests/acceptance/application-errors-test.js @@ -82,7 +82,7 @@ module('Acceptance | application errors ', function (hooks) { await percySnapshot(assert); }); - test('error pages include links to the jobs and clients pages', async function (assert) { + test('error pages include links to the jobs, clients and auth pages', async function (assert) { await visit('/a/non-existent/page'); assert.ok(JobsList.error.isPresent, 'An error is shown'); @@ -97,5 +97,12 @@ module('Acceptance | application errors ', function (hooks) { await JobsList.error.gotoClients(); assert.equal(currentURL(), '/clients', 'Now on the clients page'); assert.notOk(JobsList.error.isPresent, 'The error is gone now'); + + await visit('/a/non-existent/page'); + assert.ok(JobsList.error.isPresent, 'An error is shown'); + + await JobsList.error.gotoSignin(); + assert.equal(currentURL(), '/settings/tokens', 'Now on the sign-in 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 9100d473a..db0782b0a 100644 --- a/ui/tests/pages/jobs/list.js +++ b/ui/tests/pages/jobs/list.js @@ -63,6 +63,7 @@ export default create({ seekHelp: clickable('[data-test-error-message] a'), gotoJobs: clickable('[data-test-error-jobs-link]'), gotoClients: clickable('[data-test-error-clients-link]'), + gotoSignin: clickable('[data-test-error-signin-link]'), }, pageSizeSelect: pageSizeSelect(),