From 454fcda954245c2e95c6a668d6435aa246c6d081 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 25 Feb 2018 14:06:36 -0800 Subject: [PATCH] fix display name on instance page --- routes/settings/instances/[instanceName].html | 2 +- tests/spec/02-login-spec.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/settings/instances/[instanceName].html b/routes/settings/instances/[instanceName].html index cb13ea94..965d3acd 100644 --- a/routes/settings/instances/[instanceName].html +++ b/routes/settings/instances/[instanceName].html @@ -14,7 +14,7 @@ href="{{verifyCredentials.url}}"> {{'@' + verifyCredentials.acct}} - {{verifyCredentials.display_name}} + {{verifyCredentials.display_name || verifyCredentials.acct}}

Theme:

diff --git a/tests/spec/02-login-spec.js b/tests/spec/02-login-spec.js index 978a2733..2f630be6 100644 --- a/tests/spec/02-login-spec.js +++ b/tests/spec/02-login-spec.js @@ -43,6 +43,9 @@ test('Logs out', async t => { .click($('a').withText('Instances')) .click($('a').withText('localhost:3000')) .expect(getUrl()).contains('/settings/instances/localhost:3000') + .expect($('.instance-name-h1').innerText).eql('localhost:3000') + .expect($('.acct-handle').innerText).eql('@foobar') + .expect($('.acct-display-name').innerText).eql('foobar') .click($('button').withText('Log out')) .click($('#modal-dialog button').withText('OK')) .expect($('.container').innerText)