mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
ui: add sign-in link on err page (#17140)
This commit is contained in:
@@ -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}}
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user