ui: add sign-in link on err page (#17140)

This commit is contained in:
Jai
2023-05-11 08:24:58 -04:00
committed by GitHub
parent 889a4e38e1
commit c7f68914c1
3 changed files with 14 additions and 1 deletions

View File

@@ -93,6 +93,11 @@
data-test-error-clients-link
class="button is-white"
>Go to Clients</LinkTo>
<LinkTo
@route="settings.tokens"
data-test-error-signin-link
class="button is-white"
>Go to Sign In</LinkTo>
</div>
</div>
{{else}}

View File

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

View File

@@ -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(),