fix display name on instance page

This commit is contained in:
Nolan Lawson 2018-02-25 14:06:36 -08:00
parent 94305045eb
commit 454fcda954
2 changed files with 4 additions and 1 deletions

View file

@ -14,7 +14,7 @@
href="{{verifyCredentials.url}}"> href="{{verifyCredentials.url}}">
{{'@' + verifyCredentials.acct}} {{'@' + verifyCredentials.acct}}
</ExternalLink> </ExternalLink>
<span class="acct-display-name">{{verifyCredentials.display_name}}</span> <span class="acct-display-name">{{verifyCredentials.display_name || verifyCredentials.acct}}</span>
</div> </div>
<h2>Theme:</h2> <h2>Theme:</h2>
<form class="theme-chooser" aria-label="Choose a theme"> <form class="theme-chooser" aria-label="Choose a theme">

View file

@ -43,6 +43,9 @@ test('Logs out', async t => {
.click($('a').withText('Instances')) .click($('a').withText('Instances'))
.click($('a').withText('localhost:3000')) .click($('a').withText('localhost:3000'))
.expect(getUrl()).contains('/settings/instances/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($('button').withText('Log out'))
.click($('#modal-dialog button').withText('OK')) .click($('#modal-dialog button').withText('OK'))
.expect($('.container').innerText) .expect($('.container').innerText)