Add username to profile more info button (#11451)
* Add username to profile more info button * Update spec/requests/user/user_profile_spec.rb Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com> Co-authored-by: rhymes <rhymes@hey.com> Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
This commit is contained in:
parent
f3a69bbd84
commit
f5670e6fa2
3 changed files with 9 additions and 1 deletions
|
|
@ -150,7 +150,7 @@
|
|||
<%= render "users/metadata" %>
|
||||
|
||||
<div class="p-3 pt-0 block m:hidden js-user-info-trigger-wrapper">
|
||||
<button type="button" class="crayons-btn crayons-btn--outlined w-100 js-user-info-trigger">More info about user...</button>
|
||||
<button type="button" class="crayons-btn crayons-btn--outlined w-100 js-user-info-trigger">More info about @<%= @user.username %></button>
|
||||
</div>
|
||||
|
||||
<div class="crayons-modal align-left hidden">
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ infinitely branching threads.
|
|||
The user is the authorization/identity component of logging into the app. It is
|
||||
also the public profile/authorship/etc. belonging to the people who use the app.
|
||||
|
||||
While "user" is a perfectly good technical name, it is a fairly cold way to refer
|
||||
to humans, so we should prefer labeling people as members, or by their name/username.
|
||||
|
||||
## Tags
|
||||
|
||||
Tags are used to organize user generated content. Each tag has a set of rules
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ RSpec.describe "UserProfiles", type: :request do
|
|||
expect(response.body).to include "Pinned"
|
||||
end
|
||||
|
||||
it "calls user by their username in the 'more info' area" do
|
||||
get "/#{user.username}"
|
||||
expect(response.body).to include "More info about @#{user.username}"
|
||||
end
|
||||
|
||||
it "does not render pins if they don't exist" do
|
||||
get "/#{user.username}"
|
||||
expect(response.body).not_to include "Pinned"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue